[master 1/1] Use VGname-LVname as key for LVinfo cache

vpodzime installerbot-noreply at redhat.com
Wed Apr 1 10:13:33 UTC 2015


From: Vratislav Podzimek <vpodzime at redhat.com>

This is expected by some parts of the code and is a good way to prevent issues
with multiple LVs with the same name existing in different VGs.
---
 blivet/devicetree.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index ed53f94..49998f8 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -145,7 +145,7 @@ def pvInfo(self):
     def lvInfo(self):
         if self._lvs_cache is None:
             lvs = blockdev.lvm_lvs()
-            self._lvs_cache = dict((lv.lv_name, lv) for lv in lvs) # pylint: disable=attribute-defined-outside-init
+            self._lvs_cache = dict(("%s-%s" % (lv.vg_name, lv.lv_name), lv) for lv in lvs) # pylint: disable=attribute-defined-outside-init
 
         return self._lvs_cache
 


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/f3859da1923a0b84680356c1791cc22bb8d9cb35


More information about the anaconda-patches mailing list