[rhel7-branch] Duplicate VG names are problem even if their disks are ignored (#1198367)

Vratislav Podzimek vpodzime at redhat.com
Wed Sep 2 12:39:57 UTC 2015


Even if user tells us we should ignore a disk that contains a VG with the same
name as a VG on some not-ignored disk, it is a problem, because LVM has no idea
about our ignored disks and thus fails to do things we need to do. More
precisely, we tell LVM to filter the ignored disk out, but that only leads to it
seeing a VG with no existing or not-ignored PVs which is no-GO for it.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 blivet/devicetree.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 5248c4a..12acf26 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1593,9 +1593,7 @@ class DeviceTree(object):
             vg_device.parents.append(device)
         else:
             same_name = self.getDeviceByName(vg_name)
-            if isinstance(same_name, LVMVolumeGroupDevice) and \
-               not (all(self._isIgnoredDisk(d) for d in same_name.disks) or
-                    all(self._isIgnoredDisk(d) for d in device.disks)):
+            if isinstance(same_name, LVMVolumeGroupDevice):
                 raise DuplicateVGError("multiple LVM volume groups with the same name (%s)" % vg_name)
 
             try:
-- 
2.1.0



More information about the anaconda-patches mailing list