Merge "Ensure ovsdb-client is stopped when OVS agent dies"

This commit is contained in:
Jenkins 2014-03-01 01:30:57 +00:00 committed by Gerrit Code Review
commit e33e6b78fe
1 changed files with 6 additions and 0 deletions

View File

@ -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... "))