Skip to content

Commit 478dc04

Browse files
author
frank
committed
Bug 11357 - cloud-management dead but pid file exists
flesh out details information when PID file still existing while management server already died status 11357: resolved fixed
1 parent 5d54a3a commit 478dc04

3 files changed

Lines changed: 32 additions & 7 deletions

File tree

‎client/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-management.in‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,19 @@ set_ulimit() {
6060
fi
6161
}
6262

63+
handle_pid_file() {
64+
if [ "$1" -ne 0 ] ; then
65+
echo "The pid file locates at /var/run/cloud-management.pid and lock file at /var/lock/subsys/cloud-management.
66+
Starting cloud-management will take care of them or you can manually clean up."
67+
fi
68+
}
69+
6370
# See how we were called.
6471
case "$1" in
6572
status)
6673
status ${NAME}
6774
RETVAL=$?
75+
handle_pid_file $RETVAL
6876
;;
6977
stop)
7078
stop

‎client/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-management.in‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,19 @@ stop() {
5959
fi
6060
}
6161

62+
handle_pid_file() {
63+
if [ "$1" -ne 0 ] ; then
64+
echo "The pid file locates at /var/run/cloud-management.pid and lock file at /var/lock/subsys/cloud-management.
65+
Starting cloud-management will take care of them or you can manually clean up."
66+
fi
67+
}
68+
6269
# See how we were called.
6370
case "$1" in
6471
status)
6572
status ${NAME}
6673
RETVAL=$?
74+
handle_pid_file $RETVAL
6775
;;
6876
stop)
6977
stop

‎client/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-management.in‎

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,27 @@ set_ulimit() {
6060
fi
6161
}
6262

63+
64+
handle_pid_file() {
65+
if [ "$1" -ne 0 ] ; then
66+
echo "The pid file locates at /var/run/cloud-management.pid and lock file at /var/lock/subsys/cloud-management.
67+
Starting cloud-management will take care of them or you can manually clean up."
68+
fi
69+
}
70+
6371
# See how we were called.
6472
case "$1" in
6573
status)
66-
status ${NAME}
67-
RETVAL=$?
68-
;;
74+
status ${NAME}
75+
RETVAL=$?
76+
handle_pid_file $RETVAL
77+
;;
6978
stop)
70-
stop
71-
;;
79+
stop
80+
;;
7281
restart)
73-
stop
74-
set start
82+
stop
83+
set start
7584
set_ulimit
7685
. /etc/rc.d/init.d/tomcat6
7786
;;

0 commit comments

Comments
 (0)