[PATCH 2/2] Fix a bug and catch a change in lvm's thin pool layout.
Anne Mulhern
amulhern at redhat.com
Wed Apr 2 19:00:49 UTC 2014
----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Wednesday, April 2, 2014 10:40:24 AM
> Subject: [PATCH 2/2] Fix a bug and catch a change in lvm's thin pool layout.
>
> ---
> blivet/devicetree.py | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/blivet/devicetree.py b/blivet/devicetree.py
> index 0a39e76..a1f74a8 100644
> --- a/blivet/devicetree.py
> +++ b/blivet/devicetree.py
> @@ -1390,7 +1390,7 @@ class DeviceTree(object):
> return
>
> # raid metadata volume
> - lv_name = re.sub(r'_rmeta.+', '', lv_name[1:-1])
> + 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[name]["meta"] += lv_size
> @@ -1437,8 +1437,7 @@ class DeviceTree(object):
> # do format handling now
> self.addUdevDevice(lv_info)
>
> - raid = dict(("%s-%s" % (vg_device.name,
> - n.replace("[", "").replace("]", "")),
> + raid = dict((n.replace("[", "").replace("]", ""),
> {"copies": 0, "log": Size(bytes=0), "meta":
> Size(bytes=0)})
> for n in lv_info.keys())
> for lv in lv_info.values():
> --
> 1.9.0
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
A couple of things:
*) I'm not sure that lv_info is guaranteed to be set when its used in the second chunk.
*) I don't know the structure of the object returned by udev_get_block_device, so I can't really
say much about the second chunk change.
*) The commit message should have more information in it.
- mulhern
More information about the anaconda-patches
mailing list