diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2013-07-10 18:35:07 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-07-13 08:17:36 +0900 |
commit | 3ac48b77e101af8e88c7345848f1a29f7346460a (patch) | |
tree | 21297f85b55bf761ae0165898c418ff73aa6912b | |
parent | 1fd877f7c18455aee7202e55856f287e40fcd4ab (diff) |
gre_tunnel: exception due to race condition
This depends on thread scheduling.
When event handler is invoked, there may not corresponding network_id in
network module.
In fact, Network.remove_network() fires EventNetworkPort(add_del=False)
before EventNetworkDel event so that it is unnecessary to call
_vm_port_mac_handler().
> 127.0.0.1 - - [19/Jun/2013 11:24:25] "DELETE
> /v1.0/networks/8179bb70-a63f-4c74-a82e-a21f3c275c9a HTTP/1.1" 200 115 0.000488
> hub: uncaught exception: Traceback (most recent call last):
> File "/opt/stack/ryu/ryu/lib/hub.py", line 50, in _launch
> func(*args, **kwargs)
> File "/opt/stack/ryu/ryu/base/app_manager.py", line 104, in _event_loop
> handler(ev)
> File "/opt/stack/ryu/ryu/app/gre_tunnel.py", line 210, in network_del_handler
> for (dpid, port_no) in self.nw.list_ports(network_id):
> File "/opt/stack/ryu/ryu/controller/network.py", line 319, in list_ports
> return self.networks.list_ports(network_id)
> File "/opt/stack/ryu/ryu/controller/network.py", line 97, in list_ports
> raise NetworkNotFound(network_id=network_id)
> NetworkNotFound: no such network id 8179bb70-a63f-4c74-a82e-a21f3c275c9a
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/app/gre_tunnel.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/ryu/app/gre_tunnel.py b/ryu/app/gre_tunnel.py index 2302aed1..f58a0249 100644 --- a/ryu/app/gre_tunnel.py +++ b/ryu/app/gre_tunnel.py @@ -207,8 +207,6 @@ class PortSet(app_manager.RyuApp): tunnel_key = self.tunnels.get_key(network_id) except tunnels.TunnelKeyNotFound: return - for (dpid, port_no) in self.nw.list_ports(network_id): - self._vm_port_mac_handler(dpid, port_no, network_id, False) self._tunnel_key_del(tunnel_key) @handler.set_ev_cls(network.EventNetworkPort) |