Bug 528098 - dmraid and kpartx are called with bogus args in rc.sysinit
Summary: dmraid and kpartx are called with bogus args in rc.sysinit
Keywords:
Status: CLOSED DUPLICATE of bug 527726
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-09 03:36 UTC by Bruce Jerrick
Modified: 2014-03-17 03:20 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-10-09 15:51:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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 ***


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