[rhel7-branch 3/6] Change allow_degraded_mdraid flag to allow_imperfect_devices (#1202877)

mulkieran installerbot-noreply at redhat.com
Tue Jun 2 22:34:49 UTC 2015


From: mulhern <amulhern at redhat.com>

Related: rhbz#1090009
Related: rhbz#1202877

(cherry picked from commit 0eb434ba53d5c122205e56f7bad322780c3b65f8)

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 760bd3f..9870348 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -873,7 +873,7 @@ def addUdevMDDevice(self, info):
                         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:
@@ -881,7 +881,7 @@ def addUdevMDDevice(self, info):
             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
@@ -1150,7 +1150,7 @@ def addUdevDevice(self, info):
         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 @@ def __init__(self):
         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 @@ def update_from_anaconda_flags(self, anaconda_flags):
         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


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/d066845dd99bf4e70cbd8133ff1a7fbdab821cdc


More information about the anaconda-patches mailing list