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

[PATCH] Add a separate function to get an LV's VG name.



It's a different key depending on whether you are after the VG name
for a PV or an LV, so make it clear by using a separate function.

Related: rhbz#772878
---
 pyanaconda/storage/devicetree.py |    2 +-
 pyanaconda/storage/udev.py       |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 0ec9fc9..3a6ca40 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -610,7 +610,7 @@ class DeviceTree(object):
             pv_info = udev_get_block_device(pv_sysfs_path)
             self.addUdevDevice(pv_info)
 
-        vg_name = udev_device_get_vg_name(info)
+        vg_name = udev_device_get_lv_vg_name(info)
         device = self.getDeviceByName(vg_name)
         if not device:
             log.error("failed to find vg '%s' after scanning pvs" % vg_name)
diff --git a/pyanaconda/storage/udev.py b/pyanaconda/storage/udev.py
index ddb7967..dcdf6bc 100644
--- a/pyanaconda/storage/udev.py
+++ b/pyanaconda/storage/udev.py
@@ -322,6 +322,9 @@ def udev_device_get_md_name(info):
 def udev_device_get_vg_name(info):
     return info['LVM2_VG_NAME']
 
+def udev_device_get_lv_vg_name(info):
+    return info['DM_VG_NAME']
+
 def udev_device_get_vg_uuid(info):
     return info['LVM2_VG_UUID']
 
-- 
1.7.6


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