Bug 726843 - dracut plugin cleans all matching disks when wildcard is specified
Summary: dracut plugin cleans all matching disks when wildcard is specified
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node
Version: 6.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Mike Burns
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 725964
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-29 22:34 UTC by Mike Burns
Modified: 2011-12-06 19:25 UTC (History)
6 users (show)

Fixed In Version: ovirt-node-2.0.2-0.2.git1b3c2f5.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 19:25:42 UTC
Target Upstream Version:


Attachments (Terms of Use)
Patch (2.31 KB, patch)
2011-08-22 13:58 UTC, Mike Burns
no flags Details | Diff
Patch (1.44 KB, patch)
2011-08-22 14:17 UTC, Mike Burns
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1783 0 normal SHIPPED_LIVE rhev-hypervisor6 bug fix and enhancement update 2011-12-06 15:10:54 UTC

Description Mike Burns 2011-07-29 22:34:48 UTC
Description of problem:
When specifying storage_init=/dev/vd* (for example) and firstboot, the dracut plugin will wipe all disks that match /dev/vd*.  In other situations, storage_init=/dev/vd* will resolve to the first match (/dev/vda).  

The dracut plugin should do the same resolving

Version-Release number of selected component (if applicable):
6.2-0.9

How reproducible:
Always

Steps to Reproduce:
1. Have a machine with multiple disks (vm with /dev/vda /dev/vdb)
2. run rhevh with storage_init=/dev/vd* firstboot
3. 
  
Actual results:
dracut plugin will report that it wiped /dev/vda, /dev/vda1.. (for all partitions) and /dev/vdb and all partitions ( and vdc... if you have them)

Expected results:
should resolve /dev/vd* to be first matching disk (/dev/vda)

Additional info:
Also need to watch out for multiple disks, e.g. /dev/vd*,/dev/vdb

Comment 3 Mike Burns 2011-08-15 15:23:30 UTC
Issue actually comes up when specifying multiple disks, not just a single disk.


storage_init=/dev/vd*,/dev/vdc

Comment 4 Mike Burns 2011-08-22 13:58:23 UTC
Created attachment 519285 [details]
Patch

Patch simply escapes wildcards prior to the for loop, and removes escaping once in the for loop:

For testing:

various combinations of storage_init parameter including *

/dev/vd*,/dev/vdb

For verifying, if you pass rdinfo on the kernel command line, you'll get output like:

dracut: checking device "/dev/vd*" for all device checked.  The lines should match exactly what was passed in the storage_init parameter

Comment 5 Mike Burns 2011-08-22 14:17:10 UTC
Created attachment 519295 [details]
Patch

Previous patch file was for a different bz

Comment 8 errata-xmlrpc 2011-12-06 19:25:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1783.html


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