From ec4dd1f12eff5aab513845cafa87fbec8166adff Mon Sep 17 00:00:00 2001 From: Amy Fong Date: Fri, 21 Mar 2014 17:07:29 -0400 Subject: 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 Signed-off-by: Bruce Ashfield --- .../python/python-nova/nova-spicehtml5proxy | 91 ---------------------- 1 file changed, 91 deletions(-) delete mode 100644 meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy (limited to 'meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy') diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy b/meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy deleted file mode 100644 index d58f71e..0000000 --- a/meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy +++ /dev/null @@ -1,91 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: nova-spicehtml5proxy -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Should-Start: libvirt-bin -# Should-Stop: libvirt-bin -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: nova-spicehtml5proxy service -# Description: Provides spice html5 proxy services for the openstack -# cloud computing system -### END INIT INFO - - -set -e - -NAME=nova-spicehtml5proxy -DESC="OpenStack Compute Spice HTML5 Proxy" -SCRIPTNAME=/etc/init.d/$NAME -DAEMON=/usr/bin/nova-spicehtml5proxy -DAEMON_ARGS="" -PIDFILE=/var/run/nova/$NAME.pid - -ENABLED=true - -if test -f /etc/default/nova-consoleproxy; then - . /etc/default/nova-consoleproxy -fi - -if ! [ "${NOVA_CONSOLE_PROXY_TYPE}" = "spicehtml5" ] ; then - exit 0 -fi - -mkdir -p /var/run/nova -chown nova:root /var/run/nova/ - -mkdir -p /var/lock/nova -chown nova:root /var/lock/nova/ - -. /lib/lsb/init-functions - -export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" -export TMPDIR=/var/lib/nova/tmp - -if ! [ -x ${DAEMON} ] ; then - exit 0 -fi - -status() -{ - pid=`cat $PIDFILE 2>/dev/null` - if [ -n "$pid" ]; then - if ps -p $pid >&- ; then - echo "$DESC is running" - return - fi - fi - echo "$DESC is not running" -} - -case "$1" in - start) - test "$ENABLED" = "true" || exit 0 - echo "Starting $DESC" "$NAME" - start-stop-daemon --start -b -m --pidfile $PIDFILE --exec ${DAEMON} -- ${DAEMON_ARGS} - log_end_msg $? - ;; - stop) - test "$ENABLED" = "true" || exit 0 - echo "Stopping $DESC" "$NAME" - start-stop-daemon --stop --oknodo --pidfile ${PIDFILE} - log_end_msg $? - ;; - restart|force-reload|reload) - test "$ENABLED" = "true" || exit 1 - $0 stop - sleep 1 - $0 start - ;; - status) - test "$ENABLED" = "true" || exit 0 - status - ;; - *) - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status|reload|status}" - exit 1 - ;; -esac - -exit 0 -- cgit v1.2.3-54-g00ecf