Bug 830848

Summary: sanlock: initscript should create /var/lock/subsys/sanlock
Product: Red Hat Enterprise Linux 6 Reporter: Daniel Berrange <berrange>
Component: sanlockAssignee: David Teigland <teigland>
Status: CLOSED ERRATA QA Contact: Haim <hateya>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.4CC: ajia, cluster-maint, cpelland, lnatapov, psztoch, yeylon
Target Milestone: rcKeywords: Reopened, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sanlock-2.5-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 03:52:44 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 841991, 906027    

Description Daniel Berrange 2012-06-11 10:13:08 EDT
Description of problem:
The 'killall' initscript that is run when a machine shuts down, iterates over all files in /var/lock/subsys/, taking filenames as a service name. It invokes the stop action on each initscript which a subsys file.

Unfortunately, the sanlock initscript never creates/deletes any /var/lock/subsys/sanlock file, so it is not handled by the killall init script.

Version-Release number of selected component (if applicable):
sanlock-2.3-1.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. /etc/init.d/sanlock start
2. ls /var/lock/subsys/sanlock
3.
  
Actual results:
subsys file not present

Expected results:
subsys file should be present


Additional info:
Comment 2 David Teigland 2012-06-11 11:06:42 EDT
Hi Dan, this seems to work for me, could you check for any wdmd or sanlock errors in /var/log/messages?  This could also be related to all the uid issues we've been going through (sanlock is now back to being root, so that should lessen the problems.)

# modprobe softdog
# service wdmd start
# service sanlock start

# ps ax | grep -E 'sanlock|wdmd'
17771 ?        SLs    0:00 wdmd -G sanlock
17787 ?        SLsl   0:00 sanlock daemon -U sanlock -G sanlock

# ls -l /var/run/sanlock/
total 4
-rw-rw-rw-. 1 root    root    6 Jun 11 10:17 sanlock.pid
srw-rw----. 1 sanlock sanlock 0 Jun 11 10:17 sanlock.sock

# killall sanlock

# ps ax | grep -E 'sanlock|wdmd'
17771 ?        SLs    0:00 wdmd -G sanlock
Comment 3 Daniel Berrange 2012-06-11 11:21:05 EDT
You are mixing up the 'killall' command in /usr/bin which kills processes based on their argv[0] name, with the /etc/init.d/killall script which stops init services based on the existance of /var/lock/subsys/XXXXXX (where XXXX must be the initscript name ie 'sanlock').
Comment 4 David Teigland 2012-06-11 12:01:06 EDT
Thanks, I've pushed out a fix for both sanlock and wdmd:
http://git.fedorahosted.org/git/?p=sanlock.git;a=commitdiff;h=e25453ccd46d265de1d5ef720e40977786a6fb1b
Comment 5 David Teigland 2012-07-09 17:36:46 EDT

*** This bug has been marked as a duplicate of bug 838654 ***
Comment 6 David Teigland 2012-07-13 11:27:12 EDT
deconsolidating
Comment 9 Leonid Natapov 2012-12-17 10:17:41 EST
sanlock-2.6-2.el6.x86_64.


[root@cinteg26 ~]# service sanlock start
Starting sanlock:                                          [  OK  ]
[root@cinteg26 ~]# ls -al /var/run/sanlock/
total 12
drwxrwxr-x.  2 sanlock sanlock 4096 Dec 17 17:17 .
drwxr-xr-x. 24 root    root    4096 Dec 17 13:23 ..
-rw-r--r--.  1 sanlock sanlock    6 Dec 17 17:17 sanlock.pid
srw-rw----.  1 sanlock sanlock    0 Dec 17 17:17 sanlock.sock
[root@cinteg26 ~]#
Comment 11 errata-xmlrpc 2013-02-21 03:52:44 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0530.html