nsg-ethz / p4-utils

Extension to Mininet that makes P4 networks easier to build
GNU General Public License v2.0
175 stars 65 forks source link

CLI: Exit p4switch_start method if switch already running #1

Closed fschleiss closed 6 years ago

fschleiss commented 6 years ago

If the P4 switch is already running, an error message is correctly issued. The issue is nevertheless, that the method is not exited at this stage which leads to an unsuccessful reload which stops the CLI.

Reproduce

Error Output

mininet> p4switch_start s4
P4 Switch already running, stop first: p4switch_stop s4 
File includes/headers16.p4 does not exist 
../p4src/main.p4 p4src/main.json False False
Starting P4 switch s4.
simple_switch -i 1@s4-eth1 -i 2@s4-eth2 -i 3@s4-eth3 --pcap --thrift-port 9093 --nanolog ipc:///tmp/bm-3-log.ipc --device-id 3 p4src/main.json --log-console
P4 switch s4 did not start correctly.Check the switch log file.