p4lang / p4factory

Compile P4 and run the P4 behavioral simulator
Apache License 2.0
174 stars 106 forks source link

INT: Unable to run the docker image for mininet-spine1 #175

Closed Muthuramane closed 7 years ago

Muthuramane commented 7 years ago

Hi All,

I am try to run the apps/int but it had problem while running the docker.

parallels@ubuntu:~/p4lang/p4factory/mininet$ sudo ./int_ref_topology.py [sudo] password for parallels: ['docker', 'run', '-ti', '--rm', '--privileged=true', '--hostname=spine1', '--name=mininet-spine1', '-p', '26002:9091', '-e', 'DISPLAY', '-v', '/tmp/.X11-unix:/tmp/.X11-unix', '-v', '/home/parallels/p4lang/p4factory/mininet/configs/spine1/l3_int_ref_topo:/configs', 'p4dockerswitch', '/p4factory/tools/start.sh'] Traceback (most recent call last): File "./int_ref_topology.py", line 107, in run_cfg() File "./int_ref_topology.py", line 83, in run_cfg net = mgr.setupAndStartNetwork() File "/home/parallels/p4lang/p4factory/mininet/int_cfg.py", line 113, in setupAndStartNetwork self.addSwitches() File "/home/parallels/p4lang/p4factory/mininet/int_cfg.py", line 147, in addSwitches pps = s.pps, qdepth = s.qdepth) File "build/bdist.linux-x86_64/egg/mininet/net.py", line 240, in addSwitch File "/home/parallels/p4lang/p4factory/mininet/p4_mininet.py", line 148, in init Switch.init( self, name, **kwargs ) File "build/bdist.linux-x86_64/egg/mininet/node.py", line 855, in init File "build/bdist.linux-x86_64/egg/mininet/node.py", line 106, in init File "/home/parallels/p4lang/p4factory/mininet/p4_mininet.py", line 277, in startShell self.pid = int(ps_out[0]) ValueError: invalid literal for int() with base 10: ''

I ran the same command by manually

sudo docker run -ti --rm --privileged=true --hostname=spine1 --name=mininet-spine1 -p 26002:9091 -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/parallels/p4lang/p4factory/mininet/configs/spine1/l3_int_ref_topo:/configs p4dockerswitch /p4factory/tools/start.sh docker: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\"/p4factory/tools/start.sh\\": stat /p4factory/tools/start.sh: no such file or directory\"\n".

The file start.sh is missing under the directory p4factory/tools/start.sh.

Please, any one know about this issue

herlenashavi commented 7 years ago

Hi, The mininet scripts for INT will be hosted in a new repo. In the meanwhile, I recommend you to use NTF to run the mininet scripts for INT.

Thanks

herlenashavi commented 7 years ago

INT example in p4factory has been fixed. Please refer link.

Thanks

Muthuramane commented 7 years ago

Thanks @herlenashavi .

The problem was resolved.

ersuneetsingh commented 5 years ago

Hi, I am getting the following error, could you please give any suggestions: Adding switch spine1 Adding switch spine2 Adding switch leaf1 Adding switch leaf2 Waiting 10 seconds for switches to intialize... INT Config spine1 Traceback (most recent call last): File "./int_ref_topology.py", line 131, in run_cfg(model_dir) File "./int_ref_topology.py", line 91, in run_cfg net = mgr.setupAndStartNetwork() File "/home/suneet/Desktop/p4factory/mininet/int_cfg.py", line 148, in setupAndStartNetwork self.configSwitches() File "/home/suneet/Desktop/p4factory/mininet/int_cfg.py", line 238, in configSwitches self.configSwitch(s) File "/home/suneet/Desktop/p4factory/mininet/int_cfg.py", line 252, in configSwitch client.switcht_api_init( device ) File "/home/suneet/Desktop/p4factory/submodules/switch/switchapi/switch_api_thrift/switch_api_rpc.py", line 1565, in switcht_api_init return self.recv_switcht_api_init() File "/home/suneet/Desktop/p4factory/submodules/switch/switchapi/switch_api_thrift/switch_api_rpc.py", line 1577, in recv_switcht_api_init (fname, mtype, rseqid) = iprot.readMessageBegin() File "/usr/local/lib/python2.7/dist-packages/thrift/protocol/TBinaryProtocol.py", line 134, in readMessageBegin sz = self.readI32() File "/usr/local/lib/python2.7/dist-packages/thrift/protocol/TBinaryProtocol.py", line 217, in readI32 buff = self.trans.readAll(4) File "/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py", line 60, in readAll chunk = self.read(sz - have) File "/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py", line 162, in read self.rbuf = BufferIO(self.trans.read(max(sz, self.__rbuf_size))) File "/usr/local/lib/python2.7/dist-packages/thrift/transport/TSocket.py", line 132, in read message='TSocket read 0 bytes') thrift.transport.TTransport.TTransportException: TSocket read 0 bytes

jafingerhut commented 5 years ago

Note that the top level README of this project points out that it is deprecated, and recommends looking at p4lang/tutorials instead, which has several people working on it, and thus you are more likely to get help with problems. It is fairly unlikely someone will be interested in helping you debug issues with the code in this repository.

ersuneetsingh commented 5 years ago

@jafingerhut Thank you for your suggestions. I build the switch docker image and the VXLAN-GPE driver again, now everything is working perfectly.

Thank you.