Bug 960476

Summary: glusterd service script doesn't create lockfile
Product: [Community] GlusterFS Reporter: Niels de Vos <ndevos>
Component: buildAssignee: Niels de Vos <ndevos>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 3.4.0-alphaCC: gluster-bugs
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 958666 Environment:
Last Closed: 2013-07-24 17:58:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 958666, 963122, 967483    

Description Niels de Vos 2013-05-07 09:10:13 UTC
/etc/init.d/glusterd script doesn't create lockfile in /var/lock/subsys, and glusterd service doesn't stop when shutting down or reboot gluster node.

When I tried as follow, it works fine.

 /etc/init.d/ctdb stop
 /etc/init.d/glusterd stop
 shutdown -h now

So I think glusterd service script should create lockfile to ensure stopping glusterd service in shutdown/reboot procedure.

Comment 1 Anand Avati 2013-05-07 09:14:59 UTC
REVIEW: http://review.gluster.org/4960 (extras: /etc/init.d/glusterd should create a lockfile under /var/lock/sybsys) posted (#1) for review on master by Niels de Vos (ndevos)

Comment 2 Anand Avati 2013-05-07 09:22:30 UTC
REVIEW: http://review.gluster.org/4961 (extras: /etc/init.d/glusterd should create a lockfile under /var/lock/sybsys) posted (#1) for review on release-3.4 by Niels de Vos (ndevos)

Comment 3 Anand Avati 2013-05-07 18:44:58 UTC
COMMIT: http://review.gluster.org/4960 committed in master by Anand Avati (avati) 
------
commit b5bf14a6ab0d24073d0dd4debf87c7fc15a1e43f
Author: Niels de Vos <ndevos>
Date:   Tue May 7 11:10:26 2013 +0200

    extras: /etc/init.d/glusterd should create a lockfile under /var/lock/sybsys
    
    Without a lockfile under /var/lock/subsys, the glusterd service is not
    stopped on shutdown or reboot.
    
    Change-Id: I9dc9b4204c5c39879c22191b2e8a2b81a4f3a58a
    BUG: 960476
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/4960
    Reviewed-by: Kaleb KEITHLEY <kkeithle>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Anand Avati <avati>

Comment 4 Anand Avati 2013-05-07 18:48:54 UTC
COMMIT: http://review.gluster.org/4961 committed in release-3.4 by Anand Avati (avati) 
------
commit f00720f3ed760f018d8c847476563a5eb1b111a3
Author: Niels de Vos <ndevos>
Date:   Tue May 7 11:10:26 2013 +0200

    extras: /etc/init.d/glusterd should create a lockfile under /var/lock/sybsys
    
    Without a lockfile under /var/lock/subsys, the glusterd service is not
    stopped on shutdown or reboot.
    
    Change-Id: Ib2c28821061ed0fd374731681a81f3fd8e989193
    BUG: 960476
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/4961
    Reviewed-by: Kaleb KEITHLEY <kkeithle>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Anand Avati <avati>

Comment 5 Anand Avati 2013-05-23 09:53:42 UTC
REVIEW: http://review.gluster.org/5074 (extras: prevent "glusterd dead but subsys locked") posted (#1) for review on master by Niels de Vos (ndevos)

Comment 6 Anand Avati 2013-05-25 18:42:00 UTC
COMMIT: http://review.gluster.org/5074 committed in master by Vijay Bellur (vbellur) 
------
commit 689618e2fc0cecbfa06ef02b6c259a1a8502971f
Author: Niels de Vos <ndevos>
Date:   Thu May 23 11:25:27 2013 +0200

    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>
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/5074
    Reviewed-by: Jeff Darcy <jdarcy>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>