Merge "Enable mutable config in Neutron"

This commit is contained in:
Zuul 2018-03-28 20:57:08 +00:00 committed by Gerrit Code Review
commit 0610aa1815
8 changed files with 11 additions and 10 deletions

View File

@ -47,4 +47,4 @@ def main():
topic=topics.DHCP_AGENT,
report_interval=cfg.CONF.AGENT.report_interval,
manager='neutron.agent.dhcp.agent.DhcpAgentWithStateReport')
service.launch(cfg.CONF, server).wait()
service.launch(cfg.CONF, server, restart_method='mutate').wait()

View File

@ -51,4 +51,4 @@ def main(manager='neutron.agent.l3.agent.L3NATAgentWithStateReport'):
topic=topics.L3_AGENT,
report_interval=cfg.CONF.AGENT.report_interval,
manager=manager)
service.launch(cfg.CONF, server).wait()
service.launch(cfg.CONF, server, restart_method='mutate').wait()

View File

@ -1034,5 +1034,5 @@ def main():
LB_AGENT_BINARY)
setup_profiler.setup("neutron-linuxbridge-agent", cfg.CONF.host)
LOG.info("Agent initialized successfully, now running... ")
launcher = service.launch(cfg.CONF, agent)
launcher = service.launch(cfg.CONF, agent, restart_method='mutate')
launcher.wait()

View File

@ -222,5 +222,5 @@ def main():
constants.AGENT_TYPE_MACVTAP,
MACVTAP_AGENT_BINARY)
LOG.info("Agent initialized successfully, now running... ")
launcher = service.launch(cfg.CONF, agent)
launcher = service.launch(cfg.CONF, agent, restart_method='mutate')
launcher.wait()

View File

@ -2132,7 +2132,7 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin,
self.catch_sigterm = False
if self.catch_sighup:
LOG.info("Agent caught SIGHUP, resetting.")
self.conf.reload_config_files()
self.conf.mutate_config_files()
config.setup_logging()
LOG.debug('Full set of CONF:')
self.conf.log_opt_values(LOG, logging.DEBUG)

View File

@ -200,7 +200,8 @@ class AllServicesNeutronWorker(neutron_worker.BaseWorker):
def __init__(self, services, worker_process_count=1):
super(AllServicesNeutronWorker, self).__init__(worker_process_count)
self._services = services
self._launcher = common_service.Launcher(cfg.CONF)
self._launcher = common_service.Launcher(cfg.CONF,
restart_method='mutate')
def start(self):
for srv in self._services:
@ -226,7 +227,7 @@ def _start_workers(workers):
try:
if process_workers:
worker_launcher = common_service.ProcessLauncher(
cfg.CONF, wait_interval=1.0
cfg.CONF, wait_interval=1.0, restart_method='mutate'
)
# add extra process worker and spawn there all workers with

View File

@ -296,4 +296,4 @@ def main():
report_interval=cfg.CONF.AGENT.report_interval,
manager='neutron.services.metering.agents.'
'metering_agent.MeteringAgentWithStateReport')
service.launch(cfg.CONF, server).wait()
service.launch(cfg.CONF, server, restart_method='mutate').wait()

View File

@ -192,8 +192,8 @@ class Server(object):
# The API service runs in a number of child processes.
# Minimize the cost of checking for child exit by extending the
# wait interval past the default of 0.01s.
self._server = common_service.ProcessLauncher(cfg.CONF,
wait_interval=1.0)
self._server = common_service.ProcessLauncher(
cfg.CONF, wait_interval=1.0, restart_method='mutate')
self._server.launch_service(service,
workers=service.worker_process_count)