[openstack-glance/f21] add systemd notify to scruber service

Alan Pevec apevec at fedoraproject.org
Wed Sep 10 23:01:48 UTC 2014


commit 63fa7ed680e4e69f96de66e97e15f6716686379f
Author: Alan Pevec <alan.pevec at redhat.com>
Date:   Thu Sep 11 00:54:14 2014 +0200

    add systemd notify to scruber service

 ...ify-calling-process-we-are-ready-to-serve.patch |   25 ++++++++++++++++++-
 1 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/0004-notify-calling-process-we-are-ready-to-serve.patch b/0004-notify-calling-process-we-are-ready-to-serve.patch
index 91782ff..051e779 100644
--- a/0004-notify-calling-process-we-are-ready-to-serve.patch
+++ b/0004-notify-calling-process-we-are-ready-to-serve.patch
@@ -1,4 +1,4 @@
-From 47a01a9112a12164fc040019a402e0df42eb34d2 Mon Sep 17 00:00:00 2001
+From 6d1f53bb2d48e0dda03f375efd67fa1bd49bdffa Mon Sep 17 00:00:00 2001
 From: Alan Pevec <apevec at redhat.com>
 Date: Tue, 11 Feb 2014 22:36:00 +0100
 Subject: [PATCH] notify calling process we are ready to serve
@@ -33,8 +33,9 @@ Change-Id: I80f325c9be9c171c2dc8d5526570bf64f0f87c78
 ---
  glance/cmd/api.py                  |   2 +
  glance/cmd/registry.py             |   2 +
+ glance/cmd/scrubber.py             |   2 +
  glance/openstack/common/systemd.py | 104 +++++++++++++++++++++++++++++++++++++
- 3 files changed, 108 insertions(+)
+ 4 files changed, 110 insertions(+)
  create mode 100644 glance/openstack/common/systemd.py
 
 diff --git a/glance/cmd/api.py b/glance/cmd/api.py
@@ -77,6 +78,26 @@ index 23623a8..4cbc798 100755
          server.wait()
      except RuntimeError as e:
          sys.exit("ERROR: %s" % e)
+diff --git a/glance/cmd/scrubber.py b/glance/cmd/scrubber.py
+index 95694ea..3df34a8 100755
+--- a/glance/cmd/scrubber.py
++++ b/glance/cmd/scrubber.py
+@@ -34,6 +34,7 @@ from oslo.config import cfg
+ 
+ from glance.common import config
+ from glance.openstack.common import log
++from glance.openstack.common import systemd
+ from glance import scrubber
+ import glance.store
+ 
+@@ -65,6 +66,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/glance/openstack/common/systemd.py b/glance/openstack/common/systemd.py
 new file mode 100644
 index 0000000..47612a9


More information about the scm-commits mailing list