Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 886114 Details for
Bug 1036515
Fix some OpenStack init scripts to return non-zero if service cannot start
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
corresponding packaging patch for rhos4 openstack-nova
0001-improve-service-startup-with-sysv-initscript.patch (text/plain), 4.05 KB, created by
Alan Pevec
on 2014-04-14 12:04:50 UTC
(
hide
)
Description:
corresponding packaging patch for rhos4 openstack-nova
Filename:
MIME Type:
Creator:
Alan Pevec
Created:
2014-04-14 12:04:50 UTC
Size:
4.05 KB
patch
obsolete
>From bd68a725b319b1d3cfc229c5dff610c238b6e38d Mon Sep 17 00:00:00 2001 >From: Alan Pevec <apevec@redhat.com> >Date: Fri, 10 Jan 2014 03:39:20 +0100 >Subject: [PATCH] improve service startup with sysv initscript > >use systemd style readiness notification to signal when daemon is ready >and avoid premature return from "daemon" command. > >Fix for rhbz#1036515 in openstack-nova >--- > daemon_notify.sh | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ > openstack-nova-api.init | 6 +++-- > openstack-nova.spec | 8 +++++++ > 3 files changed, 71 insertions(+), 2 deletions(-) > create mode 100755 daemon_notify.sh > >diff --git a/daemon_notify.sh b/daemon_notify.sh >new file mode 100755 >index 0000000..e72443b >--- /dev/null >+++ b/daemon_notify.sh >@@ -0,0 +1,59 @@ >+#!/bin/bash >+ >+# >+# start process in the background and wait for its readiness notification >+# via systemd style NOTIFY_SOCKET >+# >+daemon_notify() { >+ exec=$1 >+ pidfile=$2 >+ startuplog=$3 >+ timeout=$4 >+ >+ # Requires: >+ # uuidgen (util-linux) >+ # sleep (coreutils) >+ export NOTIFY_SOCKET='@/org/rdoproject/systemd/notify/'$(uuidgen) >+ python -m nova.openstack.common.systemd $timeout & >+ pidnotify=$! >+ $exec &>$startuplog & >+ pid=$! >+ while [ -d /proc/$pid -a -d /proc/$pidnotify ] >+ do >+ sleep 1 >+ done >+ # pick up return codes from either process >+ if [ ! -d /proc/$pid ] >+ then >+ wait $pid >+ retval=$? >+ else >+ retval=-1 >+ fi >+ if [ ! -d /proc/$pidnotify ] >+ then >+ wait $pidnotify >+ retnotify=$? >+ else >+ retnotify=-1 >+ fi >+ if [ $retnotify -eq 0 ] >+ then >+ # readiness notification received, all OK >+ echo $pid > $pidfile >+ return 0 >+ else >+ # readiness not received >+ if [ $retval -eq -1 ] >+ then >+ # process exists in unknown state >+ return 1 >+ else >+ # startup failed >+ return $retval >+ fi >+ fi >+} >+ >+daemon_notify "$@" >+exit $? >diff --git a/openstack-nova-api.init b/openstack-nova-api.init >index ff6f525..c74a8ba 100644 >--- a/openstack-nova-api.init >+++ b/openstack-nova-api.init >@@ -29,7 +29,9 @@ prog=openstack-nova-$suffix > exec="/usr/bin/nova-$suffix" > config="/etc/nova/nova.conf" > pidfile="/var/run/nova/nova-$suffix.pid" >-logfile="/var/log/nova/$suffix.log" >+startuplog="/var/log/nova/$prog-startup.log" >+timeout=60 >+wrapper="/usr/share/nova/daemon_notify.sh" > > [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog > >@@ -39,7 +41,7 @@ start() { > [ -x $exec ] || exit 5 > [ -f $config ] || exit 6 > echo -n $"Starting $prog: " >- daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile" >+ daemon --user nova --pidfile $pidfile "$wrapper $exec $pidfile $startuplog $timeout" > retval=$? > echo > [ $retval -eq 0 ] && touch $lockfile >diff --git a/openstack-nova.spec b/openstack-nova.spec >index 739ef1c..b432a02 100644 >--- a/openstack-nova.spec >+++ b/openstack-nova.spec >@@ -11,6 +11,7 @@ URL: http://openstack.org/projects/compute/ > Source0: https://launchpad.net/nova/havana/%{version}/+download/nova-%{version}.tar.gz > > Source1: nova-dist.conf >+Source3: daemon_notify.sh > Source6: nova.logrotate > > Source10: openstack-nova-api.init >@@ -120,6 +121,10 @@ Requires(postun): initscripts > Requires(preun): chkconfig > Requires(pre): shadow-utils > >+# for daemon_notify >+Requires: /usr/bin/uuidgen >+Requires: /bin/sleep >+ > Requires: python-setuptools > > %description common >@@ -629,6 +634,9 @@ install -p -m 644 %{SOURCE260} %{buildroot}%{_datadir}/nova/ > install -p -m 644 %{SOURCE270} %{buildroot}%{_datadir}/nova/ > install -p -m 644 %{SOURCE280} %{buildroot}%{_datadir}/nova/ > >+# Install service readiness wrapper >+install -p -D -m 755 %{SOURCE3} %{buildroot}%{_datadir}/nova/daemon_notify.sh >+ > # Install rootwrap files in /usr/share/nova/rootwrap > mkdir -p %{buildroot}%{_datarootdir}/nova/rootwrap/ > install -p -D -m 644 etc/nova/rootwrap.d/* %{buildroot}%{_datarootdir}/nova/rootwrap/ >-- >1.9.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
xqueralt
: review+
Actions:
View
|
Diff
Attachments on
bug 1036515
: 886114 |
886273
|
886948
|
886960
|
886961
|
886962
|
886976
|
886978
|
887135