[blivet][master,rhel7] do not try to install over broken storage

David Lehman dlehman at redhat.com
Fri Jan 9 21:32:29 UTC 2015


The idea is to establish a minimum standard of input quality in terms of
initial storage setup. It is not necessary that we be able to handle every
possible crazy thing we might encounter. Users deserve some responsibility
for preparing their systems for a fresh OS installation.

This covers two cases:

 1. gpt disklabels with corrupt primary or backup labels
 2. lvm volume group name collisions (multiple vg w/ same name)

In both cases, if the installer_mode flag is set, we raise an exception.
The accompanying anaconda patches install a callback to ask the user if
they prefer to go fix the issue using the shell or abort the installation.

The first patch is just a basic attempt to prevent issues with active
lvm preventing us from clobbering a corrupt gpt disklabel. It is probably
not very useful once the third and fourth patches are applied, but it
does establish parity between our handling of lvm and md in these
situations.

The second allows users to avoid the issue temporarily by using kickstart
to ignore the offending disk(s).

I'm on the fence as to whether we should include the lvm part of patch
four in the rhel7-branch. Opinions welcome.

The basic reason we have issues trying to clear devices from disks with
partially-corrupt gpt disklabels is that we rely on pyparted to manage
partitions and disklabels and it currently does not allow us to proceed
with partially corrupt disklabels. I know clumens started looking into
making pyparted capable of letting us proceed in the face of a partially
corrupt gpt disklabel. If that gets done soon enough it would be relevant
here, especially if we decide the lvm part of these patches isn't suitable
for rhel7-branch.

David Lehman (4):
  Try to deactivate lvm on corrupted gpt disks.
  Don't raise an exception for failure to scan an ignored disk.
  Move storageInitialize into anaconda.
  Raise UnusableConfigurationError when unusable configuration is
    detected.

 blivet/__init__.py   | 33 +--------------------------------
 blivet/devicetree.py | 36 +++++++++++++++++++++++++++---------
 blivet/errors.py     |  8 ++++----
 3 files changed, 32 insertions(+), 45 deletions(-)

-- 
1.9.3



More information about the anaconda-patches mailing list