Skip to content

Commit

Permalink
Don't crash when processing cached LVs
Browse files Browse the repository at this point in the history
Just ignore the unsupported "sub-LVs" and consider cached LVs normal LVs.
  • Loading branch information
vpodzime committed Jun 3, 2015
1 parent d215b34 commit 28ed0a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion blivet/populator.py
Expand Up @@ -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])
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 28ed0a5

Please sign in to comment.