Still awaiting verification from bug reporter, but I was reproducing it and this fixed it for me.
--- pyanaconda/ui/gui/spokes/custom.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 2f2422a..6ca4a20 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -1448,6 +1448,12 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): if _device is None: # in this case we have removed the old device so we now have # to re-create it + + # the disks need to be updated since we've replaced all + # of the devices with copies in the devicefactory error + # handler + old_disk_names = [d.name for d in old_disks] + old_disks = [self.__storage.devicetree.getDeviceByName(n) for n in old_disk_names] try: self._replace_device(old_device_type, device.size, disks=old_disks,
On Mon, 2014-02-24 at 15:42 -0600, David Lehman wrote:
pyanaconda/ui/gui/spokes/custom.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 2f2422a..6ca4a20 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -1448,6 +1448,12 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): if _device is None: # in this case we have removed the old device so we now have # to re-create it
# the disks need to be updated since we've replaced all# of the devices with copies in the devicefactory error# handlerold_disk_names = [d.name for d in old_disks]old_disks = [self.__storage.devicetree.getDeviceByName(n) for n in old_disk_names] try: self._replace_device(old_device_type, device.size, disks=old_disks,
Looks good to me.
----- Original Message -----
From: "David Lehman" dlehman@redhat.com To: anaconda-patches@lists.fedorahosted.org Sent: Monday, February 24, 2014 4:42:22 PM Subject: [PATCH] Update disk refs when recovering from a devicefactory failure. (#1032141)
pyanaconda/ui/gui/spokes/custom.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 2f2422a..6ca4a20 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -1448,6 +1448,12 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): if _device is None: # in this case we have removed the old device so we now have # to re-create it
# the disks need to be updated since we've replacedall
# of the devices with copies in the devicefactoryerror
# handlerold_disk_names = [d.name for d in old_disks]old_disks =[self.__storage.devicetree.getDeviceByName(n) for n in old_disk_names] try: self._replace_device(old_device_type, device.size, disks=old_disks, -- 1.8.5.3
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
I recently fixed a bug (#981316) where getDeviceByID() was returning None for disks which were no longer there. Is it guaranteed that getDeviceByName() will always find a disk?
- mulhern
On Tue, 2014-02-25 at 07:34 -0500, Anne Mulhern wrote:
----- Original Message -----
From: "David Lehman" dlehman@redhat.com To: anaconda-patches@lists.fedorahosted.org Sent: Monday, February 24, 2014 4:42:22 PM Subject: [PATCH] Update disk refs when recovering from a devicefactory failure. (#1032141)
pyanaconda/ui/gui/spokes/custom.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 2f2422a..6ca4a20 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -1448,6 +1448,12 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): if _device is None: # in this case we have removed the old device so we now have # to re-create it
# the disks need to be updated since we've replacedall
# of the devices with copies in the devicefactoryerror
# handlerold_disk_names = [d.name for d in old_disks]old_disks =[self.__storage.devicetree.getDeviceByName(n) for n in old_disk_names] try: self._replace_device(old_device_type, device.size, disks=old_disks, -- 1.8.5.3
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
I recently fixed a bug (#981316) where getDeviceByID() was returning None for disks which were no longer there. Is it guaranteed that getDeviceByName() will always find a disk?
It should be, yes. There is no way to change the disk set within the custom spoke, let alone within a call to Blivet.factoryDevice. Non-disk block devices come and go, but disk set should always remain constant within any given visit to the custom spoke.
David
- mulhern
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
anaconda-patches@lists.fedorahosted.org