[blivet:rhel7:master 1/3] Change allow_degraded_mdraid flag to allow_imperfect_devices (#1090009)

mulhern amulhern at redhat.com
Wed Dec 3 19:33:06 UTC 2014


Related: rhbz#1090009

The only change is a name change. The plan is to use this flag for situations
where it is better to use the imperfect device then to deactivate or remove it
or otherwise get it out of sight.

Generally, when installing, imperfect devices are best avoided, because
you don't really want to install onto them. But when in installer rescue
mode and many other situations, it is better to expose an imperfect but
still usable device.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/devicetree.py | 6 +++---
 blivet/flags.py      | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index de67b16..189a9e7 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -881,7 +881,7 @@ class DeviceTree(object):
                         return
 
         # try to get the device again now that we've got all the slaves
-        device = self.getDeviceByName(name, incomplete=flags.allow_degraded_mdraid)
+        device = self.getDeviceByName(name, incomplete=flags.allow_imperfect_devices)
 
         if device is None:
             try:
@@ -889,7 +889,7 @@ class DeviceTree(object):
             except KeyError:
                 log.warning("failed to obtain uuid for mdraid device")
             else:
-                device = self.getDeviceByUuid(uuid, incomplete=flags.allow_degraded_mdraid)
+                device = self.getDeviceByUuid(uuid, incomplete=flags.allow_imperfect_devices)
 
         # if we get here, we found all of the slave devices and
         # something must be wrong -- if all of the slaves are in
@@ -1154,7 +1154,7 @@ class DeviceTree(object):
         if device is None and udev.device_is_md(info):
             device = self.getDeviceByName(
                udev.device_get_md_name(info),
-               incomplete=flags.allow_degraded_mdraid)
+               incomplete=flags.allow_imperfect_devices)
             if device and not isinstance(device, MDRaidArrayDevice):
                 # make sure any device we found is an md device
                 device = None
diff --git a/blivet/flags.py b/blivet/flags.py
index e293794..459bd69 100644
--- a/blivet/flags.py
+++ b/blivet/flags.py
@@ -63,7 +63,7 @@ class Flags(object):
         self.boot_cmdline = {}
 
         self.update_from_boot_cmdline()
-        self.allow_degraded_mdraid = True
+        self.allow_imperfect_devices = True
 
     def get_boot_cmdline(self):
         buf = open("/proc/cmdline").read().strip()
@@ -101,7 +101,7 @@ class Flags(object):
         self.gpt = anaconda_flags.gpt
 
         self.multipath_friendly_names = anaconda_flags.mpathFriendlyNames
-        self.allow_degraded_mdraid = anaconda_flags.rescue_mode
+        self.allow_imperfect_devices = anaconda_flags.rescue_mode
 
         self.ibft = anaconda_flags.ibft
         self.dmraid = anaconda_flags.dmraid
-- 
1.9.3



More information about the anaconda-patches mailing list