Bug 527957

Summary: mdmonitor initscript lsb compliance
Product: [Fedora] Fedora Reporter: Yulia Kopkova <ykopkova>
Component: mdadmAssignee: Doug Ledford <dledford>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dledford
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-01 22:53:24 UTC Type: ---
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: 521669    

Description Yulia Kopkova 2009-10-08 11:46:29 UTC
Description of problem:

According to https://fedoraproject.org/wiki/Packaging/SysVInitScript dnsmasq
component init script have few lsb compliance issues:

1. Init script should return code "4" if restarting service under
nonprivileged user:
# su testuserqa -c "service mdmonitor restart"; echo $?
Starting mdmonitor: runuser: cannot set groups: Operation not permitted
                                                           [FAILED]
1
now: 1 
expected: 4 

2. if program is dead and /var/run pid file exists init script should return code "1"
# ps ax | grep mdadm
 3663 ?        Ss     0:00 mdadm --monitor --scan -f --pid-file=/var/run/mdadm/mdadm.pid
# kill -11 3663
# ls -l /var/run/mdadm/mdadm.*
-rw-r--r--. 1 root root 5 2009-10-08 11:30 /var/run/mdadm/mdadm.pid
# service mdmonitor status ; echo $?
mdadm is stopped
3
now: 3
expected: 1

3. if program is dead and /var/lock lock file exists init script should return code "2"
# service mdmonitor stop
Killing mdmonitor:                                         [  OK  ]
# touch /var/lock/subsys/mdmonitor
# service mdmonitor status ; echo $?
mdadm is stopped
3
now: 3
expected: 2

Comment 1 Doug Ledford 2009-11-05 19:17:42 UTC
Will be fixed in mdadm-3.0.3-1

Comment 2 Yulia Kopkova 2009-11-18 13:09:40 UTC
Doug,
I've tried mdadm-3.0.3-1 and found fix is not complete:

# service mdmonitor stop ; echo $?
Killing mdmonitor:                                         [  OK  ]
0
# service mdmonitor status ; echo $?
mdmonitor dead but pid file exists
1
now: 1
expected: 3 and message "service stopped"

Comment 3 Doug Ledford 2009-12-01 22:53:24 UTC
Should be fixed in mdadm-3.0.3-2