Merge "Ensure ovsdb-client is stopped when OVS agent dies"
This commit is contained in:
commit
e35c5f7765
@ -15,6 +15,7 @@
|
||||
# under the License.
|
||||
|
||||
import distutils.version as dist_version
|
||||
import signal
|
||||
import sys
|
||||
import time
|
||||
|
||||
@ -1245,6 +1246,10 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
|
||||
self.rpc_loop(polling_manager=pm)
|
||||
|
||||
|
||||
def handle_sigterm(signum, frame):
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def check_ovs_version(min_required_version, root_helper):
|
||||
LOG.debug(_("Checking OVS version for VXLAN support"))
|
||||
installed_klm_version = ovs_lib.get_installed_ovs_klm_version()
|
||||
@ -1343,6 +1348,7 @@ def main():
|
||||
cfg.CONF.set_default('ip_lib_force_root', True)
|
||||
|
||||
agent = OVSNeutronAgent(**agent_config)
|
||||
signal.signal(signal.SIGTERM, handle_sigterm)
|
||||
|
||||
# Start everything.
|
||||
LOG.info(_("Agent initialized successfully, now running... "))
|
||||
|
Loading…
x
Reference in New Issue
Block a user