Bug 1200833

Summary: [RFE] Unmatched devices with ignoredisk and clearpart cause kickstart scripts to fail
Product: Red Hat Enterprise Linux 7 Reporter: infernix
Component: anacondaAssignee: Martin Kolman <mkolman>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: low Docs Contact:
Priority: medium    
Version: 7.2CC: jstodola, mhruscak, mkolman, mkovarik, salmy
Target Milestone: rcKeywords: FutureFeature, Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-21.48.22.80-1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 23:07:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description infernix 2015-03-11 13:09:43 UTC
Description of problem:

When trying to match multiple potential device names to ignoredisk or clearpart, a KickstartValueError is raised when one of them isn't found. 

For example, SATA DOMs that can be matched as target disk with "ignoredisk --only-use=/dev/disk/by-id/ata-SATA_SSD*,/dev/disk/by-id/ata-SATADOM*" fail when one of those matches exists but the other does not.

So when you have a bunch of machines with *one single* SATA DOM where some of them are matched with "ata-SATA_SSD*" and others with "ata-SATADOM*", the only acceptable solution is to maintain multiple kickstart scripts.

The issue also applies in reverse, e.g. when using "ignoredisk --disks=/dev/disk/by-id/*INTEL*,/dev/disk/by-id/*OCZ*" because this also causes a kickstart failure when there are either no INTEL or no OCZ drives present; it only works correctly when both matches are true.

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


How reproducible:

100% of the time

Steps to Reproduce:
1. Make a kickstart with "ignoredisk --only-use=foo,bar' where foo is a valid match for a device and bar is not
2. Try to install with this kickstart script

Actual results:

Kickstart fails with an error for the unmatched device bar


Expected results:

Kickstart should ignore the non-existing device bar if device foo exists and matches

Comment 2 David Cantrell 2015-04-01 20:53:43 UTC
While Red Hat welcomes bug reports on Red Hat products here in our public
bugzilla database, please keep in mind that bugzilla is not a support tool or
means of accessing support.  If you would like technical support please visit
our support portal at access.redhat.com or call us for information on
subscription offerings to suit your needs.

Comment 3 infernix 2015-04-01 21:15:37 UTC
David,

I created this bug at the request of mkolman while debugging this on #anaconda in freenode. Please do not consider this a support request and keep it open.

Comment 4 Martin Kolman 2015-06-18 09:25:08 UTC
I more or less see two things that need to be done to handle this use case:

- wildcard support: being able to match globs like --disks=/dev/disk/by-id/*INTEL*
- being able to survive unmatched device

I can see multiple ways of handling the second point - always ignoring unmatched wildcards or something like:

/dev/disk/by-id/*INTEL*|/dev/disk/by-id/*OCZ*

As long as at least one wildcard/specification in a | separated list matches no error would be generated.

Comment 6 Martin Kolman 2016-05-12 14:32:02 UTC
Work on this change uncovered some issues with the resolve_glob() function in Blivet: https://github.com/rhinstaller/blivet/issues/417

Comment 7 Martin Kolman 2016-06-23 14:26:32 UTC
Initial implementation has been posted for review:
https://github.com/rhinstaller/anaconda/pull/682

Comment 11 errata-xmlrpc 2016-11-03 23:07:07 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.

https://rhn.redhat.com/errata/RHEA-2016-2158.html