[openstack-keystone/el6] add upstart job for RHEL6
Alan Pevec
apevec at fedoraproject.org
Thu Jun 21 19:28:03 UTC 2012
commit bbb3e0e9e1d14bca6306404d5455c0b910ad686d
Author: Alan Pevec <apevec at redhat.com>
Date: Thu Jun 21 21:02:28 2012 +0200
add upstart job for RHEL6
alternative to sysv initscript, only one can be enabled!
To use upstart job first disable sysv initscript:
service openstack-keystone stop
chkconfig openstack-keystone off
Install upstart job:
cp /usr/share/openstack-keystone/openstack-keystone.upstart \
/etc/init/openstack-keystone.conf
initctl reload-configuration
initctl start openstack-keystone
Test respawning:
initctl status openstack-keystone
(kill that pid)
initctl status openstack-keystone
(note new pid)
openstack-keystone.spec | 8 +++++++-
openstack-keystone.upstart | 12 ++++++++++++
2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/openstack-keystone.spec b/openstack-keystone.spec
index 4cfe953..c3dad62 100644
--- a/openstack-keystone.spec
+++ b/openstack-keystone.spec
@@ -11,7 +11,7 @@
Name: openstack-keystone
Version: 2012.1
-Release: 8%{?dist}
+Release: 9%{?dist}
#Release: 0.1.%{release_letter}%{milestone}%{?dist}
Summary: OpenStack Identity Service
@@ -22,6 +22,7 @@ Source0: http://launchpad.net/keystone/%{release_name}/%{version}/+downlo
#Source0: http://keystone.openstack.org/tarballs/keystone-%{version}%{snaptag}.tar.gz
Source1: openstack-keystone.logrotate
Source2: openstack-keystone.init
+Source3: openstack-keystone.upstart
Source5: openstack-keystone-sample-data
Patch0: openstack-keystone-newdeps.patch
@@ -149,6 +150,7 @@ install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack
install -p -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/openstack-keystone
# Install sample data script.
install -p -D -m 755 tools/sample_data.sh %{buildroot}%{_datadir}/%{name}/sample_data.sh
+install -p -D -m 644 %{SOURCE3} %{buildroot}%{_datadir}/%{name}/%{name}.upstart
install -p -D -m 755 %{SOURCE5} %{buildroot}%{_bindir}/openstack-keystone-sample-data
install -d -m 755 %{buildroot}%{_sharedstatedir}/keystone
@@ -228,6 +230,7 @@ fi
%{_bindir}/openstack-keystone-sample-data
%{_datadir}/%{name}
%{_datadir}/%{name}/sample_data.sh
+%{_datadir}/%{name}/%{name}.upstart
%{_initrddir}/openstack-keystone
%dir %{_sysconfdir}/keystone
%config(noreplace) %attr(-, root, keystone) %{_sysconfdir}/keystone/keystone.conf
@@ -255,6 +258,9 @@ fi
%{python_sitelib}/keystone/middleware/auth_token.py*
%changelog
+* Thu Jun 21 2012 Alan Pevec <apevec at redhat.com> 2012.1-9
+- add upstart job, alternative to sysv initscript
+
* Fri Jun 15 2012 Alan Pevec <apevec at redhat.com> 2012.1-8
- fix upgrade case with python-keystone-auth-token (rhbz#824034#c20)
diff --git a/openstack-keystone.upstart b/openstack-keystone.upstart
new file mode 100644
index 0000000..84e19ae
--- /dev/null
+++ b/openstack-keystone.upstart
@@ -0,0 +1,12 @@
+# Licensed under the Apache License, Version 2.0
+# http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/quantal/keystone/quantal/view/head:/debian/copyright
+description "OpenStack Identity Service"
+author "Soren Hansen <soren at linux2go.dk>"
+# modified for RHEL6 by apevec at gmail.com
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec keystone-all" keystone
More information about the scm-commits
mailing list