os-ken/ryu/app
Isaku Yamahata 6080f2c008 quantum_adapter: check if quantum_controller_addr is valid
With this, more understandable error will be produced.
Otherwise it results in mysterious error like

transaction error: {"details":"Table Bridge column controller row 69da7121-51fa-4d6e-ad24-18ff9c857b87 references nonexistent row 17c4aa64-ed91-4d8a-a905-a137e6969ad9 in table Controller.","error":"referential integrity violation"}
hub: uncaught exception: Traceback (most recent call last):
  File "/ryu/ryu/lib/hub.py", line 50, in _launch
    func(*args, **kwargs)
  File "/ryu/ryu/base/app_manager.py", line 104, in _event_loop
    handler(ev)
  File "/ryu/ryu/app/quantum_adapter.py", line 383, in conf_switch_set_handler
    self._conf_switch_set_ovsdb_addr(ev.dpid, ev.value)
  File "/ryu/ryu/app/quantum_adapter.py", line 372, in _conf_switch_set_ovsdb_addr
    ovs_switch.set_ovsdb_addr(dpid, value)
  File "/ryu/ryu/app/quantum_adapter.py", line 169, in set_ovsdb_addr
    ovs_bridge.set_controller([self.ctrl_addr])
  File "/ryu/ryu/lib/ovs/bridge.py", line 128, in set_controller
    self.run_command([command])
  File "/ryu/ryu/lib/ovs/bridge.py", line 101, in run_command
    self.vsctl.run_command(commands, self.timeout, self.exception)
  File "/ryu/ryu/lib/ovs/vsctl.py", line 1006, in run_command
    self._run_command(commands)
  File "/ryu/ryu/lib/ovs/vsctl.py", line 999, in _run_command
    self._do_main(commands)
  File "/ryu/ryu/lib/ovs/vsctl.py", line 927, in _do_main
    if self._do_vsctl(idl_, commands):
  File "/ryu/ryu/lib/ovs/vsctl.py", line 898, in _do_vsctl
    vsctl_fatal('transaction error: %s' % txn_.get_error())
  File "/ryu/ryu/lib/ovs/vsctl.py", line 132, in vsctl_fatal
    raise Exception(msg)        # not call ovs.utils.ovs_fatal for reusability
Exception: transaction error: {"details":"Table Bridge column controller row 69da7121-51fa-4d6e-ad24-18ff9c857b87 references nonexistent row 17c4aa64-ed91-4d8a-a905-a137e6969ad9 in table Controller.","error":"referential integrity violation"}

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-20 06:20:59 +09:00
..
__init__.py initial commit 2011-12-09 15:56:05 +09:00
cbench.py cbench: specify OF1.0 2012-07-18 16:54:43 +09:00
client.py ryu-client: support Topology REST API 2013-03-31 18:13:26 +09:00
conf_switch_key.py ryu/app: REST API to set per-switch configuration 2013-02-05 23:37:48 +09:00
gre_tunnel.py app/gre_tunnel: pylint 2013-05-18 05:55:04 +09:00
ofctl_rest.py ofctl_{rest, v1_0}: update and clean up 2012-12-20 18:52:26 +09:00
quantum_adapter.py quantum_adapter: check if quantum_controller_addr is valid 2013-06-20 06:20:59 +09:00
rest_conf_switch.py log-cleanup: remove an unused logger instance 2013-03-06 01:33:31 +09:00
rest_firewall.py ryu/app/rest_firewall.py: handling of no switch connection 2013-04-20 05:03:09 +09:00
rest_nw_id.py app/rest_nw_id: add port type for reserved port and vport-gre 2013-02-04 22:32:32 +09:00
rest_quantum.py fix typos in comments 2013-02-08 22:55:39 +09:00
rest_topology.py topology: Add REST API 2013-03-31 18:13:12 +09:00
rest_tunnel.py rest_tunnel: fix comment typos 2013-04-24 19:19:23 +09:00
rest.py app/rest: add requirements to path component 2013-02-08 22:55:16 +09:00
simple_isolation.py log-cleanup: per RyuApp logger 2013-03-06 01:35:14 +09:00
simple_switch.py log-cleanup: per RyuApp logger 2013-03-06 01:35:14 +09:00
simple_vlan.py sweep the tree to change from gevent to ryu.lib.hub 2013-05-01 22:18:39 +09:00
tunnel_port_updater.py sweep the tree to change from gevent to ryu.lib.hub 2013-05-01 22:18:39 +09:00
wsgi.py sweep the tree to change from gevent to ryu.lib.hub 2013-05-01 22:18:39 +09:00