[PATCH 2/7] Fix MDRaidArrayDevice mediaPresent to not depend on paritioned state

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

 



Wether or not a RaidSet is partitioned, should not matter for its
mediaPresent handling. What sort of RaidSet it is matters. This patch
fixes us trying to do format handling on a Raid Container, which ends
badly.
---
 storage/devices.py |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 93da0cf..f21e730 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2808,15 +2808,15 @@ class MDRaidArrayDevice(StorageDevice):
 
     @property
     def mediaPresent(self):
-        present = None
-        if self.partitioned:
-            # Even if stopped/deactivated we still want to show up in
-            # storage.disks
-            present = True
-        else:
-            present = self.partedDevice is not None
+        # Containers should not get any format handling done
+        # (the device node does not allow read / write calls)
+        if self.type == "mdcontainer":
+            return False
+        # BIOS RAID sets should show as present even when teared down
+        if self.devices and self.devices[0].type == "mdcontainer":
+            return True
 
-        return present
+        return self.partedDevice is not None
 
     @property
     def model(self):
-- 
1.6.5.2

_______________________________________________
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