Bug 174642

Summary: init.d script for mdadm (mdmonitor) calls daemon() incorrectly
Product: [Fedora] Fedora Reporter: David R. Linn <drl>
Component: mdadmAssignee: Doug Ledford <dledford>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
URL: file://etc/init.d/mdmonitor
Whiteboard:
Fixed In Version: 2.6.2-4.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-20 19:35:37 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:

Description David R. Linn 2005-12-01 00:26:10 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8) Gecko/20051130 Firefox/1.5

Description of problem:
The call to the daemon function (from /etc/init.d/functions) in the start function of /etc/init.d/mdmonitor is

daemon --check --user=root mdadm ${OPTIONS}

This is not correct syntactically.  It tells the daemon function to check for
a process named "--user=root"

I suspect that the intention was

daemon --check=mdadm/mdadm --user=root mdadm ${OPTIONS}

which will check the correct path for the pid file, *BUT* doesn't actually
do the right thing either.  The daemon function is simply not coded to handle
a pid file that is not directly in /var/run


Version-Release number of selected component (if applicable):
mdadm-1.11.0-4.fc4

How reproducible:
Always

Steps to Reproduce:
1.cat /etc/init.d/mdmonitor
2.
3.
  

Additional info:

Comment 1 David R. Linn 2005-12-01 03:46:37 UTC
For what it's worth, the killproc() call in mdmonitor has a similar problem.  
The daemon() and killproc() functions are designed to work with pid files 
in /var/run and the mdadm pid file is in /var/run/mdadm.  It's not clear how 
to me how to resolve this incompatibility.

Comment 2 Christian Iseli 2007-01-20 00:38:32 UTC
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.

Comment 3 David R. Linn 2007-01-20 00:47:37 UTC
This is still a problem in FC5, patched up to about 6 weeks ago.
I do not have any FC6 systems to check.

Comment 4 Doug Ledford 2007-07-03 16:56:33 UTC
This problem still exists.  However, I'm correcting it.  It will be solved in
mdadm-2.6.2-2 or later.

Comment 5 Fedora Update System 2007-07-05 19:12:11 UTC
mdadm-2.6.2-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2007-07-09 15:47:52 UTC
mdadm-2.6.2-3.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2007-07-10 06:42:05 UTC
mdadm-2.6.2-4.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2007-07-20 19:35:06 UTC
mdadm-2.6.2-4.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.