We hit a case where the projected layout matches exactly the preexisting layout, and so the equality test gives a false positive due to pyparted's sneaky comparison methods. This happens when you do autopart two or more times in a row on a system. --- storage/devices.py | 8 -------- storage/devicetree.py | 5 +++++ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/storage/devices.py b/storage/devices.py index cb0ba38..ae1ad09 100644 --- a/storage/devices.py +++ b/storage/devices.py @@ -704,20 +704,12 @@ class DiskDevice(StorageDevice): def removePartition(self, device): log_method_call(self, self.name, part=device.name) - if self.partedDisk != self._origPartedDisk: - log.debug("going to reset self.partedDisk to actual state") - self.resetPartedDisk() - partition = self.partedDisk.getPartitionByPath(device.path) if partition: self.partedDisk.removePartition(partition) def addPartition(self, device): log_method_call(self, self.name, part=device.name) - if self.partedDisk != self._origPartedDisk: - log.debug("going to reset self.partedDisk to actual state") - self.resetPartedDisk() - for part in self.partedDisk.partitions: log.debug("disk %s: partition %s has geom %s" % (self.name, part.getDeviceNodeName(), diff --git a/storage/devicetree.py b/storage/devicetree.py index d21883d..2a40fc4 100644 --- a/storage/devicetree.py +++ b/storage/devicetree.py @@ -607,6 +607,11 @@ class DeviceTree(object): for action in self._actions: log.debug("action: %s" % action) + log.debug("resetting parted disks...") + for device in self.devices.itervalues(): + if isinstance(device, DiskDevice): + device.resetPartedDisk() + for action in self._actions: log.info("executing action: %s" % action) if not dryRun: -- 1.6.0.6 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list