summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-02 20:28:01 +0000
committerGerrit Code Review <review@openstack.org>2017-06-02 20:28:01 +0000
commit1a5b86675dc0392940b1b1043c1bdfcb56188c16 (patch)
tree2d7c13a236f25c6486e6cd2738bffeb4ec480e27
parentf6b3d25c6ef335ff891030b8e34c1d27f45b896c (diff)
parentd54fc45d3e6bab66fe3b2350d399d600fff9405a (diff)
Merge "ovs: bubble up failures into main thread in native ofctl mode" into stable/newton
-rw-r--r--neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ovs_ryuapp.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ovs_ryuapp.py b/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ovs_ryuapp.py
index 357ccc7..b4a306d 100644
--- a/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ovs_ryuapp.py
+++ b/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ovs_ryuapp.py
@@ -17,6 +17,7 @@
17import functools 17import functools
18 18
19from oslo_log import log as logging 19from oslo_log import log as logging
20from oslo_utils import excutils
20import ryu.app.ofctl.api # noqa 21import ryu.app.ofctl.api # noqa
21from ryu.base import app_manager 22from ryu.base import app_manager
22from ryu.lib import hub 23from ryu.lib import hub
@@ -41,7 +42,8 @@ def agent_main_wrapper(bridge_classes):
41 try: 42 try:
42 ovs_agent.main(bridge_classes) 43 ovs_agent.main(bridge_classes)
43 except Exception: 44 except Exception:
44 LOG.exception(_LE("Agent main thread died of an exception")) 45 with excutils.save_and_reraise_exception():
46 LOG.exception(_LE("Agent main thread died of an exception"))
45 finally: 47 finally:
46 # The following call terminates Ryu's AppManager.run_apps(), 48 # The following call terminates Ryu's AppManager.run_apps(),
47 # which is needed for clean shutdown of an agent process. 49 # which is needed for clean shutdown of an agent process.
@@ -71,4 +73,4 @@ class OVSNeutronAgentRyuApp(app_manager.RyuApp):
71 'br_phys': _make_br_cls(br_phys.OVSPhysicalBridge), 73 'br_phys': _make_br_cls(br_phys.OVSPhysicalBridge),
72 'br_tun': _make_br_cls(br_tun.OVSTunnelBridge), 74 'br_tun': _make_br_cls(br_tun.OVSTunnelBridge),
73 } 75 }
74 return hub.spawn(agent_main_wrapper, bridge_classes) 76 return hub.spawn(agent_main_wrapper, bridge_classes, raise_error=True)