From d26b1eb357328bb838fd4e8692ad81c9e3e34647 Mon Sep 17 00:00:00 2001 From: Alberto Murillo Date: Fri, 27 Mar 2015 19:28:19 -0600 Subject: [PATCH] Enable systemd notification Signed-off-by: Alberto Murillo --- glance/cmd/api.py | 2 ++ glance/cmd/registry.py | 2 ++ glance/cmd/scrubber.py | 2 ++ openstack-common.conf | 1 + 4 files changed, 7 insertions(+) diff --git a/glance/cmd/api.py b/glance/cmd/api.py index 28fdeaf..0df790e 100755 --- a/glance/cmd/api.py +++ b/glance/cmd/api.py @@ -49,6 +49,7 @@ import osprofiler.web from glance.common import config from glance.common import exception from glance.common import wsgi +from glance.openstack.common import systemd from glance import notifier CONF = cfg.CONF @@ -85,6 +86,7 @@ def main(): server = wsgi.Server(initialize_glance_store=True) server.start(config.load_paste_app('glance-api'), default_port=9292) + systemd.notify_once() server.wait() except KNOWN_EXCEPTIONS as e: fail(e) diff --git a/glance/cmd/registry.py b/glance/cmd/registry.py index 58393b6..752ff3f 100755 --- a/glance/cmd/registry.py +++ b/glance/cmd/registry.py @@ -45,6 +45,7 @@ import osprofiler.web from glance.common import config from glance.common import utils from glance.common import wsgi +from glance.openstack.common import systemd from glance import notifier CONF = cfg.CONF @@ -72,6 +73,7 @@ def main(): server = wsgi.Server() server.start(config.load_paste_app('glance-registry'), default_port=9191) + systemd.notify_once() server.wait() except RuntimeError as e: sys.exit("ERROR: %s" % utils.exception_to_str(e)) diff --git a/glance/cmd/scrubber.py b/glance/cmd/scrubber.py index e7b4a1b..aaae76e 100755 --- a/glance/cmd/scrubber.py +++ b/glance/cmd/scrubber.py @@ -35,6 +35,7 @@ from oslo_config import cfg from oslo_log import log as logging from glance.common import config +from glance.openstack.common import systemd from glance import scrubber @@ -59,6 +60,7 @@ def main(): if CONF.daemon: server = scrubber.Daemon(CONF.wakeup_time) server.start(app) + systemd.notify_once() server.wait() else: import eventlet diff --git a/openstack-common.conf b/openstack-common.conf index 5855a4f..c2f6790 100644 --- a/openstack-common.conf +++ b/openstack-common.conf @@ -3,6 +3,7 @@ # The list of modules to copy from oslo-incubator module=install_venv_common module=service +module=systemd # The base module to hold the copy of openstack.common base=glance -- 2.1.0