Bug 528098

Summary: dmraid and kpartx are called with bogus args in rc.sysinit
Product: [Fedora] Fedora Reporter: Bruce Jerrick <bmj001>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: notting, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-09 15:51:12 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 Bruce Jerrick 2009-10-09 03:36:02 UTC
Description of problem:
In rc.sysinit, /sbin/dmraid and /sbin/kpartx are called with bogus arguments
if there are "no raid disks".

Version-Release number of selected component (if applicable):
initscripts-9.00-1.i686

How reproducible:
100%

Steps to Reproduce:
1. Boot F12 on a system with no RAID disks (suggestion: boot
     single-user; messages will stay on screen then).
2. Observe error messages.
  
Actual results:
Error messages shortly after "Welcome to Fedora":
    failed to stat() /dev/mapper/no
    failed to stat() /dev/mapper/raid
    failed to stat() /dev/mapper/disks

Expected results:
No such messages.

Additional info:
In rc.sysinit, circa lines 368-375, '/sbin/dmraid -s -c -i' is used to
build an arg list for dmraid and kpartx.
That's valid if there are RAID disks, but if not, it returns "no raid disks"
on stdout and each word of that is used subsequently as an argument.

Suggested fix:
Modify /sbin/dmraid to send its "no raid disks" to stderr (makes more sense
anyway), and in rc.sysinit, discard dmraid's stderr (i.e., 2> /dev/null).
(The latter is just cosmetic, so it's silent of there are no raid disks.)
Then the arg list will be empty and the 'for' loop won't happen).

The 'dmraid -ay ...' call would also produce complaints, but its stdout
and stderr are discarded.  (It would probably be better if its error
message came out stderr (instead of stdout as it does), and stderr not
discarded.)

Comment 1 Bill Nottingham 2009-10-09 15:51:12 UTC

*** This bug has been marked as a duplicate of bug 527726 ***