Merge "Disable process monitor for keepalived test"

This commit is contained in:
Jenkins 2017-03-08 17:32:36 +00:00 committed by Gerrit Code Review
commit 6d39d0f18e
1 changed files with 4 additions and 2 deletions

View File

@ -246,7 +246,7 @@ class KeepalivedIPv6Test(object):
self.config = None
self.config_path = None
self.nsname = "keepalivedtest-" + uuidutils.generate_uuid()
self.pm = external_process.ProcessMonitor(cfg.CONF, 'router')
self.pm = None
self.orig_interval = cfg.CONF.AGENT.check_child_processes_interval
def configure(self):
@ -271,6 +271,7 @@ class KeepalivedIPv6Test(object):
def start_keepalived_process(self):
# Disable process monitoring for Keepalived process.
cfg.CONF.set_override('check_child_processes_interval', 0, 'AGENT')
self.pm = external_process.ProcessMonitor(cfg.CONF, 'router')
# Create a temp directory to store keepalived configuration.
self.config_path = tempfile.mkdtemp()
@ -297,7 +298,8 @@ class KeepalivedIPv6Test(object):
return self
def __exit__(self, exc_type, exc_value, exc_tb):
self.pm.stop()
if self.pm:
self.pm.stop()
if self.manager:
self.manager.disable()
if self.config_path: