[PATCH][rhel6-branch] Fix scanning of non-leaf lvs. (#1213748)
David Lehman
dlehman at redhat.com
Thu Jun 4 15:45:03 UTC 2015
This fixes a regression introduced with the thinp changes that broke
the return value of handleVgLvs.
It also fixes space accounting for raid lvs, log lvs, and metadata lvs
through consistent key naming in the raid dict.
---
storage/devicetree.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/storage/devicetree.py b/storage/devicetree.py
index 8d1ed5f..0a4f754 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1634,7 +1634,7 @@ class DeviceTree(object):
lv_name = re.sub(r'_[tr]meta.*', '', lv_name[1:-1])
name = "%s-%s" % (vg_name, lv_name)
addRequiredLV(name, "failed to look up raid lv")
- raid[lv_name]["meta"] += lv_size
+ raid[name]["meta"] += lv_size
return
elif lv_attr[0] == 'l':
# log volume
@@ -1691,11 +1691,13 @@ class DeviceTree(object):
# do format handling now
self.addUdevDevice(lv_info)
- raid = dict((n.replace("[", "").replace("]", ""),
+ return ret
+
+ raid = dict(("%s-%s" % (vg_name, n.replace("[", "").replace("]", "")),
{"copies": 0, "log": 0, "meta": 0})
for n in lv_names)
for lv in zip(lv_names, lv_uuids, lv_sizes, lv_attr, lv_types):
- addLV(*lv)
+ ret |= addLV(*lv)
for name, data in raid.items():
lv_dev = self.getDeviceByName(name)
--
2.4.2
More information about the anaconda-patches
mailing list