Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   PATCH storage-branch: PV's may not have a uuid and / or a pe_start (http://www.linux-archive.org/ubuntu-user/254625-patch-storage-branch-pvs-may-not-have-uuid-pe_start.html)

Hans de Goede 02-28-2009 10:05 PM

PATCH storage-branch: PV's may not have a uuid and / or a pe_start
 
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 02:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.