[openstack-keystone] fix systemd notification
Alan Pevec
apevec at fedoraproject.org
Fri Sep 21 16:37:32 UTC 2012
commit 31af86d88716d9dc3fa71e05eb984fd2345659cd
Author: Alan Pevec <apevec at redhat.com>
Date: Fri Sep 21 18:23:29 2012 +0200
fix systemd notification
rhbz#858188
...ify-calling-process-we-are-ready-to-serve.patch | 29 ++++++++++++++++++++
openstack-keystone.service | 2 +-
openstack-keystone.spec | 7 ++++-
3 files changed, 36 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
new file mode 100644
index 0000000..063ee4c
--- /dev/null
+++ b/0004-notify-calling-process-we-are-ready-to-serve.patch
@@ -0,0 +1,29 @@
+From fd316b911f7b36595c823a10563090677083bc27 Mon Sep 17 00:00:00 2001
+From: Alan Pevec <apevec at redhat.com>
+Date: Wed, 19 Sep 2012 00:26:13 +0200
+Subject: [PATCH] notify calling process we are ready to serve
+
+Fixes bug 980037 again and again
+
+Recent SystemD moved notification socket into abstract namespace:
+http://cgit.freedesktop.org/systemd/systemd/commit/?id=29252e9e5bad3b0bcfc45d9bc761aee4b0ece1da
+
+Change-Id: Idfb1dfb272f06a8066843f0f5750ff6e70f6bc64
+---
+ keystone/common/systemd.py | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/keystone/common/systemd.py b/keystone/common/systemd.py
+index f8d3f36..52d7aff 100644
+--- a/keystone/common/systemd.py
++++ b/keystone/common/systemd.py
+@@ -27,6 +27,9 @@ def _sd_notify(msg):
+ sysd = os.getenv('NOTIFY_SOCKET')
+ if sysd:
+ sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
++ if sysd.startswith('@'):
++ # abstract namespace socket
++ sysd = '\0%s' % sysd[1:]
+ sock.connect(sysd)
+ sock.sendall(msg)
+ sock.close()
diff --git a/openstack-keystone.service b/openstack-keystone.service
index 163c36f..82b2d07 100644
--- a/openstack-keystone.service
+++ b/openstack-keystone.service
@@ -4,7 +4,7 @@ After=syslog.target network.target
[Service]
Type=notify
-Restart=on-abort
+Restart=always
User=keystone
ExecStart=/usr/bin/keystone-all --config-file /etc/keystone/keystone.conf
diff --git a/openstack-keystone.spec b/openstack-keystone.spec
index d181d88..db4ad84 100644
--- a/openstack-keystone.spec
+++ b/openstack-keystone.spec
@@ -12,7 +12,7 @@
Name: openstack-keystone
Version: 2012.2
-Release: 0.7.%{release_letter}%{milestone}%{?dist}
+Release: 0.8.%{release_letter}%{milestone}%{?dist}
Summary: OpenStack Identity Service
License: ASL 2.0
@@ -31,6 +31,7 @@ Source5: openstack-keystone-sample-data
Patch0001: 0001-match-egg-and-spec-requires.patch
Patch0002: 0002-add-Quantum-endpoint-in-sample-data.patch
Patch0003: 0003-add-Swift-endpoint-in-sample-data.patch
+Patch0004: 0004-notify-calling-process-we-are-ready-to-serve.patch
BuildArch: noarch
BuildRequires: python2-devel
@@ -115,6 +116,7 @@ This package contains documentation for Keystone.
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
+%patch0004 -p1
find . \( -name .gitignore -o -name .placeholder \) -delete
find keystone -name \*.py -exec sed -i '/\/usr\/bin\/env python/d' {} \;
@@ -256,6 +258,9 @@ fi
%endif
%changelog
+* Fri Sep 21 2012 Alan Pevec <apevec at redhat.com> 2012.2-0.8.rc1
+- fix systemd notification (rhbz#858188)
+
* Fri Sep 14 2012 Alan Pevec <apevec at redhat.com> 2012.2-0.7.rc1
- folsom rc1 (CVE-2012-4413)
More information about the scm-commits
mailing list