All launchers implemented in common.service require each service to
implement reset method because it is called in case a process
receives a SIGHUP.
This change adds the reset method to neutron.service.Service class
which is used to start dhcp and l3 agents.
Now dhcp and l3 agents don't die on receiving SIGHUP and support
reloading policy_path and logging options in config.
Partial-Bug: #
1276694
Change-Id: I96010e44928a665bea546865b2c81bde4ed0adf2
from neutron import manager
from neutron.openstack.common import loopingcall
from neutron.openstack.common import service as common_service
+from neutron import policy
from neutron import wsgi
except Exception:
LOG.exception(_LE("Exception occurs when waiting for timer"))
+ def reset(self):
+ config.setup_logging()
+ policy.refresh()
+
def periodic_tasks(self, raise_on_error=False):
"""Tasks to be run at a periodic interval."""
ctxt = context.get_admin_context()