Comment 13 for bug 1333292

Revision history for this message
Aleksandr Didenko (adidenko) wrote : Re: nova-api hangs during openstack updating

Something like this should do the trick:

--- /etc/init.d/openstack-nova-api.origin 2013-10-28 12:03:21.000000000 +0000
+++ /etc/init.d/openstack-nova-api 2014-06-25 14:45:50.045890202 +0000
@@ -49,6 +49,11 @@
 stop() {
     echo -n $"Stopping $prog: "
     killproc -p $pidfile $prog
+ if pgrep nova-$suffix &>/dev/null ; then
+ sleep 2
+ pgrep nova-$suffix &>/dev/null && \
+ killall nova-$suffix
+ fi
     retval=$?
     echo
     [ $retval -eq 0 ] && rm -f $lockfile

I've tested it and it works fine, nova-api gets restarted OK.