summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth
diff options
context:
space:
mode:
authorAmy Fong <amy.fong@windriver.com>2014-03-21 17:07:29 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-03-24 16:53:27 -0400
commitec4dd1f12eff5aab513845cafa87fbec8166adff (patch)
tree2bf84a9d4fe46723ea8c08168e09a87d455c9447 /meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth
parent6423ced4885488dbe8cc05249d7d16cbcfe750c2 (diff)
downloadmeta-cloud-services-ec4dd1f12eff5aab513845cafa87fbec8166adff.tar.gz
OpenStack: nova-novncproxy:can't stop this service
nova-novncproxy and nova-spicehtml5proxy both do not check to see if the process specified in PIDFILE exists before firing off a new one. Both initrd files can actually use nova.init (used for the many other nova-* daemons) nova-consoleauth also has this issue, we add a check in start to see if the process in PIDFILE exists and exits if it does. Signed-off-by: Amy Fong <amy.fong@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth')
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth21
1 files changed, 20 insertions, 1 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth b/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth
index 56561db..d2c1f29 100644
--- a/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth
+++ b/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth
@@ -59,8 +59,27 @@ status()
59case "$1" in 59case "$1" in
60 start) 60 start)
61 test "$ENABLED" = "true" || exit 0 61 test "$ENABLED" = "true" || exit 0
62
63 if [ -e $PIDFILE ]; then
64 PIDDIR=/proc/$(cat $PIDFILE)
65 if [ -d ${PIDDIR} ]; then
66 echo "$DESC already running."
67 exit 1
68 else
69 echo "Removing stale PID file $PIDFILE"
70 rm -f $PIDFILE
71 fi
72 fi
73 PIDDIR=`dirname $PIDFILE`
74 if [ ! -d $PIDDIR ]; then
75 mkdir -p $PIDDIR
76 chown nova $PIDDIR
77 fi
78
62 echo "Starting nova console" "nova-consoleauth" 79 echo "Starting nova console" "nova-consoleauth"
63 start-stop-daemon --start -b -m --pidfile $PIDFILE --exec ${DAEMON} -- ${DAEMON_ARGS} 80 sudo -u nova \
81 start-stop-daemon --start -b -m --pidfile $PIDFILE \
82 --exec ${DAEMON} -- ${DAEMON_ARGS}
64 log_end_msg $? 83 log_end_msg $?
65 ;; 84 ;;
66 stop) 85 stop)