P4 INT Running the reference application


p4 INT 运行出错例子
https://github.com/p4lang/p4fa ... s/int

cd p4factory/mininet
sudo ./int_ref_topology.py --model-dir=$HOME/install

各个子模块已经安装成功,运行sudo ./int_ref_topology.py --model-dir=$HOME/install时一直报如下错误,跪求解决方案。
link@ubuntu:~/p4factory/mininet$ sudo ./int_ref_topology.py --model-dir=$HOME/install
/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/link/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
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 <module>
run_cfg(model_dir)
File "./int_ref_topology.py", line 91, in run_cfg
net = mgr.setupAndStartNetwork()
File "/home/link/p4factory/mininet/int_cfg.py", line 147, in setupAndStartNetwork
self.configSwitches()
File "/home/link/p4factory/mininet/int_cfg.py", line 238, in configSwitches
self.configSwitch(s)
File "/home/link/p4factory/mininet/int_cfg.py", line 252, in configSwitch
client.switcht_api_init( device )
File "/home/link/p4factory/submodules/switch/switchapi/switch_api_thrift/switch_api_rpc.py", line 1569, in switcht_api_init
return self.recv_switcht_api_init()
File "/home/link/p4factory/submodules/switch/switchapi/switch_api_thrift/switch_api_rpc.py", line 1581, in recv_switcht_api_init
(fname, mtype, rseqid) = iprot.readMessageBegin()
File "build/bdist.linux-x86_64/egg/thrift/protocol/TBinaryProtocol.py", line 126, in readMessageBegin
File "build/bdist.linux-x86_64/egg/thrift/protocol/TBinaryProtocol.py", line 206, in readI32
File "build/bdist.linux-x86_64/egg/thrift/transport/TTransport.py", line 58, in readAll
File "build/bdist.linux-x86_64/egg/thrift/transport/TTransport.py", line 159, in read
File "build/bdist.linux-x86_64/egg/thrift/transport/TSocket.py", line 105, in read
socket.error: [Errno 104] Connection reset by peer
已邀请:

KKKKK

赞同来自:


进入switch 容器,查看日志发现bmswitchp4_drivers不存在,相关操作如下:

1)查看容器
link@ubuntu:~/p4factory/mininet$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6daaadb7e530 p4dockerswitch_bmv2 "/bin/sh -c /bin/bash" About an hour ago Up About an hour 0.0.0.0:26001->9091/tcp, 0.0.0.0:27001->10001/tcp leaf2
a9b8b0cca61b p4dockerswitch_bmv2 "/bin/sh -c /bin/bash" About an hour ago Up About an hour 0.0.0.0:26000->9091/tcp, 0.0.0.0:27000->10001/tcp leaf1
61ffb56bd02e p4dockerswitch_bmv2 "/bin/sh -c /bin/bash" About an hour ago Up About an hour 0.0.0.0:26003->9091/tcp, 0.0.0.0:27003->10001/tcp spine2
877ccafc2451 p4dockerswitch_bmv2 "/bin/sh -c /bin/bash" About an hour ago Up About an hour 0.0.0.0:26002->9091/tcp, 0.0.0.0:27002->10001/tcp spine1

2)进入容器leaf2(6daaadb7e530 )
link@ubuntu:~/p4factory/mininet$ sudo docker exec -it 6daaadb7e530 /bin/bash

3)进入/tmp 查看日志
root@leaf2:/# ls
bin etc media nnpy root sys tmp
boot home mnt opt run third-party usr
configs lib nanomsg-1.0.0 p4factory sbin thrift-0.9.2 var
dev lib64 nanomsg-1.0.0.tar.gz proc srv thrift-0.9.2.tar.gz
root@leaf2:/# cd tmp/
root@leaf2:/tmp# ls
bmv2_driver.log bmv2_model.log start.sh

root@leaf2:/tmp# cat bmv2_model.log
Calling target program-options parser
JSON input file /home/link/install/bin/../share/bmpd/switch/switch.json cannot be opened

root@leaf2:/tmp# cat bmv2_driver.log
/tmp/start.sh: line 4: /home/link/install/bin/bmswitchp4_drivers: No such file or directory

root@leaf2:/tmp# cat start.sh

#!/bin/bash
LD_LIBRARY_PATH==:/home/link/install/bin/../lib /home/link/install/bin/simple_switch --thrift-port 10001 --pcap -i 0@leaf2-eth1 -i 1@leaf2-eth2 -i 2@leaf2-eth3 -i 3@leaf2-eth4 -i 64@veth250 /home/link/install/bin/../share/bmpd/switch/switch.json >& /tmp/bmv2_model.log &
sleep 3
LD_LIBRARY_PATH=:/home/link/install/bin/../lib:/home/link/install/bin/../lib/bmpd/switch /home/link/install/bin/bmswitchp4_drivers >& /tmp/bmv2_driver.log &

有人知道这个问怎么解决吗?为什么制造的p4dockerswitch_bmv2镜像中,$HOME/install/bin 目录下没有bmswitchp4_drivers呢?

KKKKK

赞同来自:


可用,感谢回复

要回复问题请先登录注册