Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI option 'p4switches_reboot' failes if 'cli_input' not given in config #4

Closed
fschleiss opened this issue Mar 21, 2018 · 0 comments
Closed

Comments

@fschleiss
Copy link
Contributor

When cli_input is not defined in p4app.json for a switch, the Mininet CLI fails to reboot the switches.

How to reproduce:

  • add a switch to p4app.json for which you do not specify the optional cli_input
  • run
  • in the Mininet CLI, try to use p4switches_reboot

Error Log

Stopping P4 switch s5.
Starting P4 switch s5.
simple_switch -i 1@s5-eth1 -i 2@s5-eth2 -i 3@s5-eth3 --thrift-port 9094 --nanolog ipc:///tmp/bm-4-log.ipc --device-id 4 p4src/main.json --log-console >/home/user/p4/data_plane_driven_network_convergence/code/v4/p4/log/s5.log
P4 switch s5 has been started.
Traceback (most recent call last):
  File "/usr/local/bin/p4run", line 11, in <module>
    load_entry_point('p4utils', 'console_scripts', 'p4run')()
  File "/home/user/p4/data_plane_driven_network_convergence/code/p4-utils/p4utils/p4run.py", line 489, in main
    app.run_app()
  File "/home/user/p4/data_plane_driven_network_convergence/code/p4-utils/p4utils/p4run.py", line 225, in run_app
    self.do_net_cli()
  File "/home/user/p4/data_plane_driven_network_convergence/code/p4-utils/p4utils/p4run.py", line 371, in do_net_cli
    P4CLI(self.net, conf_file=self.conf_file)
  File "/home/user/p4/data_plane_driven_network_convergence/code/p4-utils/p4utils/mininetlib/cli.py", line 21, in __init__
    CLI.__init__(self, *args, **kwargs)
  File "build/bdist.linux-x86_64/egg/mininet/cli.py", line 68, in __init__
  File "build/bdist.linux-x86_64/egg/mininet/cli.py", line 103, in run
  File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "/home/user/p4/data_plane_driven_network_convergence/code/p4-utils/p4utils/mininetlib/cli.py", line 176, in do_p4switches_reboot
    self.do_p4switch_start(line=line)
  File "/home/user/p4/data_plane_driven_network_convergence/code/p4-utils/p4utils/mininetlib/cli.py", line 151, in do_p4switch_start
    commands_path = switch_conf['cli_input']
KeyError: 'cli_input'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant