[P4-dev] BMV2 in custom Dockercontainer - no thrift port

cs.lev cs.lev at gmx.com
Tue Jul 3 10:16:31 EDT 2018


Hi All,

I need behavioral-model to be working in a debian:latest based docker
container (the container build from the Dockerfile in https://github.co
m/p4lang/behavioral-model was not working for me).

I have installed everything once on a bare-metal server and everything
was working. Now, I have repeated all steps with no errors on the same
server but in a container.

My problem is that when I start simple_switch application it indeed
prints out that Thrift server was started but I neither am able to
connect to it, nor netstat would print that something is listening on
9090.

What I found as a problem, or at least the reason that when I run only
simple_switch --help, it does print out command line argument --thrift-
port on the bare metal server (right above the command line argument --
device-id), but in my container this argument is missing.

thrift was installed as follows on both the bare-metal and the
container:

cd behavioral-model/travis/

wget http://archive.apache.org/dist/thrift/0.9.2/thrift-0.9.2.tar.gz

tar -xzvf thrift-0.9.2.tar.gz

cd thrift-0.9.2

#this was needed because of an error: (SSLv3_method was not declared in
this scope) - as suggested here (https://github.com/ptrkrysik/gr-gsm/is
sues/155) I have modified it
sed -i "s/SSLv3_method/SSLv23_method/" 
lib/cpp/src/thrift/transport/TSSLSocket.cpp

./configure --without=java

make -j2 && sudo make install

cd lib/py

sudo python setup.py install


Then behavioral-switch was compiled as follows (again, in both cases):
cd behaviroral-model/

./autogen.sh

./configure --with-thrift=/home/csikor/p4/behavioral-
model/travis/thrift-0.9.2/lib/

make

sudo make install

sudo ldconfig


What could be wrong?

Thank you,
cs.lev



More information about the P4-dev mailing list