summaryrefslogtreecommitdiff
path: root/neutron/service.py
diff options
context:
space:
mode:
authorElena Ezhova <eezhova@mirantis.com>2015-04-07 14:55:50 +0300
committerElena Ezhova <eezhova@mirantis.com>2015-04-09 15:29:31 +0300
commitd9251d6e35ac87b755b63aa58bb32da20496dfba (patch)
tree77d7a9c89960bd0b26592d3eb7bbe8cc0d7ca811 /neutron/service.py
parent483de6313fab5913f9e68eb24afe65c36bd9b623 (diff)
downloadneutron-d9251d6e35ac87b755b63aa58bb32da20496dfba.tar.gz
Handle SIGHUP in dhcp and l3 agents
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
Diffstat (limited to 'neutron/service.py')
-rw-r--r--neutron/service.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/neutron/service.py b/neutron/service.py
index 448251c383..cc76c0ba97 100644
--- a/neutron/service.py
+++ b/neutron/service.py
@@ -32,6 +32,7 @@ from neutron.i18n import _LE, _LI
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
@@ -286,6 +287,10 @@ class Service(n_rpc.Service):
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()