[PATCH] Sort singlePV=True requests so they come first.

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

 



As another way to ensure the singlePV asVol requests get full pick of
what PV they want to destroy, make sure they come before the regular
asVol requests.

(Code from Dave Lehman <dlehman@xxxxxxxxxx>)

Related: rhbz#618376
---
 pyanaconda/storage/deviceaction.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/storage/deviceaction.py b/pyanaconda/storage/deviceaction.py
index 47de6b8..0505941 100644
--- a/pyanaconda/storage/deviceaction.py
+++ b/pyanaconda/storage/deviceaction.py
@@ -24,7 +24,9 @@
 from udev import *
 import math
 
-from devices import StorageDevice, PartitionDevice
+from devices import StorageDevice
+from devices import PartitionDevice
+from devices import LVMLogicalVolumeDevice
 from formats import getFormat
 from errors import *
 from parted import partitionFlag, PARTITION_LBA
@@ -259,6 +261,12 @@ class ActionCreateDevice(DeviceAction):
             otherNum = action.device.partedPartition.number
             if selfNum > otherNum:
                 rc = True
+        elif (action.isCreate and action.isDevice and
+              isinstance(self.device, LVMLogicalVolumeDevice) and
+              isinstance(action.device, LVMLogicalVolumeDevice) and
+              self.device.vg == action.device.vg and
+              action.device.singlePV and not self.device.singlePV):
+            rc = True
         return rc
 
 
-- 
1.7.3.5

_______________________________________________
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