Merge "Disable process monitor for keepalived test" into stable/newton

This commit is contained in:
Jenkins 2017-03-15 02:45:26 +00:00 committed by Gerrit Code Review
commit e334c042a4
1 changed files with 4 additions and 2 deletions

View File

@ -249,7 +249,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):
@ -274,6 +274,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()
@ -300,7 +301,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: