Bug 527957 - mdmonitor initscript lsb compliance
mdmonitor initscript lsb compliance
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: mdadm (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Doug Ledford
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: InitScriptsProject
  Show dependency treegraph
 
Reported: 2009-10-08 07:46 EDT by Yulia Kopkova
Modified: 2009-12-01 17:53 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-12-01 17:53:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Yulia Kopkova 2009-10-08 07:46:29 EDT
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 14:17:42 EST
Will be fixed in mdadm-3.0.3-1
Comment 2 Yulia Kopkova 2009-11-18 08:09:40 EST
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 17:53:24 EST
Should be fixed in mdadm-3.0.3-2

Note You need to log in before you can comment on or make changes to this bug.