Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 527957 - mdmonitor initscript lsb compliance
Summary: mdmonitor initscript lsb compliance
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mdadm
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Doug Ledford
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: InitScriptsProject
TreeView+ depends on / blocked
 
Reported: 2009-10-08 11:46 UTC by Yulia Kopkova
Modified: 2009-12-01 22:53 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-01 22:53:24 UTC
Type: ---


Attachments (Terms of Use)

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


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