[blivet:master 8/8] When adding an md array, allow adding incomplete arrays (#1090009)

mulhern amulhern at redhat.com
Wed Jun 18 19:05:15 UTC 2014


Related: rhbz#1090009

This choice is made conditional on the allow_degraded_raid flag.

The reasoning is that a degraded array may still be usable, even if it
has lost its extra disks.

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

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 5749ad9..53665af 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -887,7 +887,7 @@ class DeviceTree(object):
                         return
 
         # try to get the device again now that we've got all the slaves
-        device = self.getDeviceByName(name)
+        device = self.getDeviceByName(name, incomplete=flags.allow_degraded_raid)
 
         if device is None:
             try:
@@ -895,7 +895,7 @@ class DeviceTree(object):
             except KeyError:
                 log.warning("failed to obtain uuid for mdraid device")
             else:
-                device = self.getDeviceByUuid(uuid)
+                device = self.getDeviceByUuid(uuid, incomplete=flags.allow_degraded_raid)
 
         # if we get here, we found all of the slave devices and
         # something must be wrong -- if all of the slaves are in
-- 
1.9.3



More information about the anaconda-patches mailing list