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 357ccc76f48..b4a306dea10 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 @@ import functools from oslo_log import log as logging +from oslo_utils import excutils import ryu.app.ofctl.api # noqa from ryu.base import app_manager from ryu.lib import hub @@ -41,7 +42,8 @@ def agent_main_wrapper(bridge_classes): try: ovs_agent.main(bridge_classes) except Exception: - LOG.exception(_LE("Agent main thread died of an exception")) + with excutils.save_and_reraise_exception(): + LOG.exception(_LE("Agent main thread died of an exception")) finally: # The following call terminates Ryu's AppManager.run_apps(), # which is needed for clean shutdown of an agent process. @@ -71,4 +73,4 @@ class OVSNeutronAgentRyuApp(app_manager.RyuApp): 'br_phys': _make_br_cls(br_phys.OVSPhysicalBridge), 'br_tun': _make_br_cls(br_tun.OVSTunnelBridge), } - return hub.spawn(agent_main_wrapper, bridge_classes) + return hub.spawn(agent_main_wrapper, bridge_classes, raise_error=True)