extras: prevent "glusterd dead but subsys locked"

Commit b5bf14a6 added support for a file under /var/lock/subsys,
Hoewever, killproc does remove the $PIDFILE which cases subsequent
checks on its existence to fail. When glusterd was stopped successfully,
the $PIDFILE has been removed already, there is no need to try to remove
is again.

Upon executing '/sbin/service glusterd status', the message 'glusterd
dead but subsys locked' would be returned because the file under
/var/lock/subsys was not removed.

Bug: 960476
Change-Id: I781fe463e3c5472e42d668155cee4f63d349a568
Reported-by: Satheesaran Sundaramoorthi <sasundar@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5074
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
Niels de Vos 2013-05-23 11:25:27 +02:00 committed by Vijay Bellur
parent 2a22449720
commit 689618e2fc

View File

@ -72,7 +72,6 @@ stop()
echo -n $"Stopping $BASE:"
if pidofproc -p $PIDFILE $GLUSTERD_BIN &> /dev/null; then
killproc -p $PIDFILE $BASE
[ -w $PIDFILE ] && rm -f $PIDFILE
else
killproc $BASE
fi