Open vetletm opened 3 years ago
Hi! You need to install my fork of the PI library: https://github.com/osinstom/PI/tree/p4-ovs. I've added PIGrpcServerPipelineConfigSet
there, which is required for P4-OvS.
BTW, you should be able to run make
without sudo
I started with a new, fresh machine and installed your fork of PI, still I get the same error.
gRPC is installed with version tags/v1.17.2
, protobuf is at v3.6.1
as suggested in the PI documentation.
@vetletm Did you use p4-ovs
branch of my PI fork?
I've included what we had to do on a fresh Ubuntu 20.10 to make it build without any major issues:
apt-get update
sudo apt-get install -y automake cmake libjudy-dev libgmp-dev libpcap-dev libboost-all-dev libevent-dev libtool flex bison pkg-config g++ libssl-dev libnanomsg-dev libjudy-dev libreadline-dev valgrind libtool-bin libboost-dev libboost-system-dev libboost-thread-dev
sudo apt-get install -y python3-pip python3-dev
sudo pip3 install nnpy
# == Thrift ==
cd "$BASE_DIR"
git clone https://github.com/apache/thrift
cd thrift
git checkout v0.13.0
./bootstrap.sh
./configure --prefix=/usr
make
sudo make install
# == PI ==
sudo apt install -y libnanomsg-dev \
libprotobuf-dev protobuf-compiler protobuf-compiler-grpc \
libgrpc++-dev libgrpc-dev libgc-dev
cd "$BASE_DIR"
git clone https://github.com/osinstom/PI # *NOT* upstream: https://github.com/p4lang/PI
cd PI
git checkout p4-ovs
git submodule update --init
./autogen.sh
./configure --prefix=/usr --with-proto --with-fe-cpp --with-cli --with-internal-rpc --with-gnu-ld
make
sudo make install
# == P4-OvS ==
cd "$BASE_DIR"
git clone https://github.com/simula/P4-OvS
cd P4-OvS
git remote add upstream https://github.com/osinstom/P4-OvS.git
git checkout dreibh/build-fix-16Dec2020
./boot.sh
./configure
make
Apparently there were some missing pieces in the automake for ovs-vswitchd, you can see exactly what here: https://github.com/simula/P4-OvS/commit/fab148783180706944b6ca7e09f4bca59070e8fa
I'm happy that you succeeded to install P4-OVS! Would you mind to create PR with the above modifications to vswitchd/automake.mk
?
Hi, sorry for the late response.
I've been waiting for a response from the person who did the actual legwork, but since I've yet to hear anything I'll create a PR by the end of this week.
Hi, First of all Thank you for your effort for this project. I'm testing p4-ovs on my lab. I'm using ubuntu20.04 vm in proxmox.
I saw the same problem above and fixed it like here. After; I compiled many dependencies. (that was so painful :) ) I started the ovs-vswitchd, but that waiting something,
2021-01-27T11:31:28Z|00001|vlog|INFO|opened log file /var/log/openvswitch/ovs-vswitchd.log
2021-01-27T11:31:28Z|00002|ovs_numa|INFO|Discovered 3 CPU cores on NUMA node 0
2021-01-27T11:31:28Z|00003|ovs_numa|INFO|Discovered 3 CPU cores on NUMA node 1
2021-01-27T11:31:28Z|00004|ovs_numa|INFO|Discovered 2 NUMA nodes and 6 CPU cores
2021-01-27T11:31:28Z|00005|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock: connecting...
2021-01-27T11:31:28Z|00006|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock: connected
CTRL + C
^CServer listening on 0.0.0.0:50051
2021-01-27T11:31:45Z|00007|bridge|INFO|Setting P4 support for bridge br0
2021-01-27T11:31:45Z|00001|fatal_signal(ipf_clean1)|WARN|terminating with signal 2 (Interrupt)
I restarted the OVS with strace. And I saw this trace line.
connect(16, {sa_family=AF_UNIX, sun_path="/tmp/pi_rpc.ipc"}, 110) = -1 ENOENT (No such file or directory)
How can I pass this step?
When running
sudo make
(withoutsudo
it fails due to permissions) afterboot.sh
andconfigure
, it throws the following error:The system is a fresh virtual machine in VirtualBox with Ubuntu 18.04.5 with linux kernel 4.15.0-126-generic.
P4, PI, gRPC, Protobuf were all installed using the installation script
install-p4dev-v2.sh
from jafingerhut/p4-guide as explained in its installation guide.I get the same error with and without OpenVSwitch installed on the system.