2022 apr updates to vm ubuntu 20.04 (#461)

* Update p4lang repo source code versions to latest as of 2022-Apr-02

* Update vm-ubuntu-20.04/README.md for April 2, 2022
This commit is contained in:
Andy Fingerhut 2022-04-03 16:49:08 -04:00 committed by GitHub
parent 6cec685377
commit fbd5128098
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 66 additions and 39 deletions

View File

@ -1,19 +1,23 @@
# Creating the VM # Creating the VM
Start creating a brand new VM by running `vagrant up` in this Start creating a brand new VM by running `vagrant up` in this
directory (install vagrant on your system if needed). This command directory (install Vagrant on your system if needed). This command
would create a _release_ VM that includes P4 software installed from creates a _release_ VM that includes P4 software installed from
packages and allows to update it with `apt upgrade`. Alternatively, pre-compiled packages and allows to update those packages with `apt
a development VM can be created by running `vagrant up dev`. upgrade`.
Note that creating a development VM can take one to several hours,
depending upon the speed of your computer and Internet connection.
Steps taken to prepare a VM _after_ running `vagrant up` on the host Alternatively, a development VM can be created by running `vagrant up
OS. Some of these could probably be automated with programs, and dev`. Note that creating a development VM can take one to several
changes to the `vagrant up` scripts that can do so are welcome. I did hours, depending upon the speed of your computer and Internet
them manually to create a VM image simply to avoid the experimentation connection.
and time required to automate them, since I do not expect to create a
new VM very often (a couple of times per year?). Below are steps that were performed _after_ one of the commands above
was run on the host OS, before creating the VM images. Some of these
steps could probably be automated with programs, and changes to the
`vagrant` scripts that can do so are welcome. I performed these steps
manually to create a VM image, simply to avoid the experimentation and
time required to automate them. I typically only create new VM images
once per month.
+ Log in as user p4 (password p4) + Log in as user p4 (password p4)
+ Click "Upgrade" in the pop-up window asking if you want to upgrade + Click "Upgrade" in the pop-up window asking if you want to upgrade
@ -64,6 +68,11 @@ new VM very often (a couple of times per year?).
# Notes on test results for the VM # Notes on test results for the VM
I have run the tests below on every VM image I release, before
releasing it. You need not run them again, unless you are curious how
to do so.
## p4c testing results ## p4c testing results
Steps to run the p4c tests: Steps to run the p4c tests:
@ -71,6 +80,19 @@ Steps to run the p4c tests:
+ Log in as user vagrant (password vagrant) + Log in as user vagrant (password vagrant)
+ In a new terminal, execute these commands: + In a new terminal, execute these commands:
If you are testing on a Release VM image, first get a copy of the p4c
source code using the following command. This is unnecessary with a
Development VM image, as there is already a `p4c` directory with the
version of source code used to create that image already included in
the home directory of the `vagrant` user account:
```bash
# git clone --recursive https://github.com/p4lang/p4c
```
The following steps are common for both Release and Development VM
images:
```bash ```bash
# Compile p4c again from source, since the clean.sh step reduced disk # Compile p4c again from source, since the clean.sh step reduced disk
# space by deleting the p4c/build directory. # space by deleting the p4c/build directory.
@ -83,16 +105,12 @@ cd build
make -j2 check |& tee make-check-out.txt make -j2 check |& tee make-check-out.txt
``` ```
As of 2021-09-07, the p4c compiler passes all but 61 of its included As of 2022-04-02, the p4c compiler passes all but 64 of its included
tests. tests.
The test named cpplint fails because Python2 is not installed on the The relatively small group of tests whose names begin with 'ebpf' and
system. Omitting Python2 is intentional for this VM. The cpplint 'ubpf' fail. They work fine in the continuous integration tests on
test passes fine on other systems that have Python2 installed. the https://github.com/p4lang/p4c project, because the VM used to run
There are 60 tests whose names begin with 'ebpf' and 'ubpf' that fail.
They work fine in the continuous integration tests on the
https://github.com/p4lang/p4c project, because the VM used to run
those tests has additional software installed to enable it. Perhaps those tests has additional software installed to enable it. Perhaps
future versions of this VM will enable the ebpf and ubpf back ends to future versions of this VM will enable the ebpf and ubpf back ends to
pass these tests, also. Contributions are welcome to the needed pass these tests, also. Contributions are welcome to the needed
@ -101,9 +119,9 @@ changes in the VM build scripts to enable this.
## Send ping packets in the solution to `basic` exercise of `p4lang/tutorials` repository ## Send ping packets in the solution to `basic` exercise of `p4lang/tutorials` repository
With the branch of the p4lang/tutorials repository included with this With the version of the https://github.com/p4lang/tutorials repository
VM, the following tests pass. More testing and/or bug fixes is that comes pre-installed in the `p4` user account of this VM, the
welcome here. following tests pass.
First log in as the user `p4` (password `p4`) and open a terminal First log in as the user `p4` (password `p4`) and open a terminal
window. window.
@ -128,19 +146,28 @@ $ make stop
# Creating a single file image of the VM # Creating a single file image of the VM
For the particular case of creating the VM named 'P4 Tutorial These notes are primarily here as a reminder for people creating VM
2021-09-07' on September 7, 2021, here were the host OS details, in images for distribution. If you downloaded a VM image, these steps
case it turns out that matters to the finished VM image for some were already performed, and there is no reason you need to perform
reason: them again.
+ macOS 10.14.6 For the particular case of creating the VM named:
+ VirtualBox 6.1.26 r145957
+ Vagrant 2.2.16 + 'P4 Tutorial Development 2022-04-02'
+ created on April 2, 2022
here were the host OS details, in case it turns out that matters to
the finished VM image for some reason:
+ Windows 10 Enterprise
+ VirtualBox 6.1.30 r148432
+ Vagrant 2.2.18
In the VirtualBox GUI interface: In the VirtualBox GUI interface:
+ Choose menu item File -> Export Appliance ... + Choose menu item File -> Export Appliance ...
+ Select the VM named 'P4 Tutorial 2021-09-07' and click Continue button + Select the VM named 'P4 Tutorial Development 2022-04-02' and click
Continue button
+ Format + Format
+ I used: Open Virtualization Format 1.0 + I used: Open Virtualization Format 1.0
@ -148,7 +175,7 @@ In the VirtualBox GUI interface:
+ Open Virtualization Format 0.9 + Open Virtualization Format 0.9
+ Open Virtualization Format 2.0 + Open Virtualization Format 2.0
+ Target file + Target file
+ I used: /Users/andy/Documents/P4 Tutorial 2021-09-07.ova + I used: /Users/andy/Documents/P4 Tutorials Development 2022-04-02.ova
+ Mac Address Policy + Mac Address Policy
+ I used: Include only NAT network adapter MAC addresses + I used: Include only NAT network adapter MAC addresses
+ Other available options were: + Other available options were:
@ -162,16 +189,16 @@ Clicked "Continue" button.
Virtual system settings: Virtual system settings:
+ Name: P4 Tutorial 2021-09-07 + Name: P4 Tutorial 2022-04-02
+ Product: I left this blank + Product: I left this blank
+ Product-URL: I left this blank + Product-URL: I left this blank
+ Vendor: P4.org - P4 Language Consortium + Vendor: P4.org - P4 Language Consortium
+ Vendor-URL: https://p4.org + Vendor-URL: https://p4.org
+ Version: 2021-09-07 + Version: 2022-04-02
+ Description: + Description:
``` ```
Open source P4 development tools built from latest source code as of 2021-Sep-07 and packaged into an Ubuntu 20.04 Desktop Linux VM for the AMD64 architecture. Open source P4 development tools built from latest source code as of 2022-Apr-02 and packaged into an Ubuntu 20.04 Desktop Linux VM for the AMD64 architecture.
``` ```
+ License + License

View File

@ -4,10 +4,10 @@
set -xe set -xe
#Src #Src
BMV2_COMMIT="b0fb01ecacbf3a7d7f0c01e2f149b0c6a957f779" # 2021-Sep-07 BMV2_COMMIT="434eda7658c2fd8a8e31500e98dab9e7c1e1b0ca" # 2022-Apr-02
PI_COMMIT="a5fd855d4b3293e23816ef6154e83dc6621aed6a" # 2021-Sep-07 PI_COMMIT="f547455a260b710706bef82afab4cb9937bac416" # 2022-Apr-02
P4C_COMMIT="149634bbe4842fb7c1e80d1b7c9d1e0ec91b0051" # 2021-Sep-07 P4C_COMMIT="e1ce01b12918163570fe2c8e70a41d21ec0ca15f" # 2022-Apr-02
PTF_COMMIT="8f260571036b2684f16366962edd0193ef61e9eb" # 2021-Sep-07 PTF_COMMIT="8140532764fff58b40d0c5c995f058a6e1b36a55" # 2022-Apr-02
PROTOBUF_COMMIT="v3.6.1" PROTOBUF_COMMIT="v3.6.1"
GRPC_COMMIT="tags/v1.17.2" GRPC_COMMIT="tags/v1.17.2"