[PATCH 1/2] Raise an exception when an md dev is in the tree under the wrong name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If we somehow get this wrong it is better to signal so right away.

Related: rhbz#591970
---
 pyanaconda/storage/devicetree.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index ef53db4..8ee8671 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -1059,6 +1059,12 @@ class DeviceTree(object):
         # try to get the device again now that we've got all the slaves
         device = self.getDeviceByName(name)
 
+        if device is None:
+            device = self.getDeviceByUuid(info.get("MD_UUID"))
+            if device:
+                raise DeviceTreeError("MD RAID device %s already in "
+                                      "devicetree as %s" % (name, device.name))
+
         # if we get here, we found all of the slave devices and
         # something must be wrong -- if all of the slaves we in
         # the tree, this device should be as well
-- 
1.7.0.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux