PATCH[1/2] storage-branch: PV's may not have a uuid and / or a pe_start

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

 



PV's which do not belong to any VG do not have a uuid or a pe_start, this
patch stops us from backtracing when this happens.
---
 storage/devicetree.py |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index cdd41f0..b851d77 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -629,8 +629,14 @@ class DeviceTree(object):
                     kwargs["vgName"] = udev_device_get_vg_name(info)
                 except KeyError as e:
                     log.debug("PV %s has no vg_name" % name)
-                kwargs["vgUuid"] = udev_device_get_vg_uuid(info)
-                kwargs["peStart"] = udev_device_get_pv_pe_start(info)
+                try:
+                    kwargs["vgUuid"] = udev_device_get_vg_uuid(info)
+                except KeyError as e:
+                    log.debug("PV %s has no vg_uuid" % name)
+                try:
+                    kwargs["peStart"] = udev_device_get_pv_pe_start(info)
+                except KeyError as e:
+                    log.debug("PV %s has no pe_start" % name)

             format = formats.getFormat(*args, **kwargs)
             device.format = format
--
1.6.1.3

_______________________________________________
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