[master 1/6] Don't crash when processing cached LVs

vpodzime installerbot-noreply at redhat.com
Fri Jun 5 09:07:16 UTC 2015


From: Vratislav Podzimek <vpodzime at redhat.com>

Just ignore the unsupported "sub-LVs" and consider cached LVs normal LVs.
---
 blivet/populator.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/blivet/populator.py b/blivet/populator.py
index 157178a..9514afc 100644
--- a/blivet/populator.py
+++ b/blivet/populator.py
@@ -937,6 +937,9 @@ def addLV(lv):
                 if lv_name.endswith("_pmspare]"):
                     # spare metadata area for any thin pool that needs repair
                     return
+                elif lv_name.endswith("_cmeta]"):
+                    # cache metadata volume (skip, we ignore cache volumes)
+                    return
 
                 # raid metadata volume
                 lv_name = re.sub(r'_[tr]meta.*', '', lv_name[1:-1])
@@ -974,7 +977,7 @@ def addLV(lv):
             elif lv_name.endswith(']'):
                 # Internal LVM2 device
                 return
-            elif lv_attr[0] not in '-mMrRoO':
+            elif lv_attr[0] not in '-mMrRoOC':
                 # Ignore anything else except for the following:
                 #   - normal lv
                 #   m mirrored
@@ -983,6 +986,7 @@ def addLV(lv):
                 #   R raid without initial sync
                 #   o origin
                 #   O origin with merging snapshot
+                #   C cached LV
                 return
 
             lv_dev = self.getDeviceByUuid(lv_uuid)


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


More information about the anaconda-patches mailing list