Bug 726843

Summary: dracut plugin cleans all matching disks when wildcard is specified
Product: Red Hat Enterprise Linux 6 Reporter: Mike Burns <mburns>
Component: ovirt-nodeAssignee: Mike Burns <mburns>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.2CC: apevec, leiwang, mburns, moli, ovirt-maint, ycui
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-node-2.0.2-0.2.git1b3c2f5.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 19:25:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 725964    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

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