[PATCH rhel6-branch] Correct matching of md raid names containing special characters (#1096889)

Samantha N. Bueno sbueno+anaconda at redhat.com
Tue May 13 12:23:25 UTC 2014


On Mon, May 12, 2014 at 06:03:45PM +0200, Artur Paszkiewicz wrote:
> In md raid device names, udev replaces spaces and tabs with '_' and '/'
> with '-'. Such names are returned by udev_device_get_md_name(), but in
> DeviceTree.isIgnored() this is compared with names from
> DeviceTree.exclusiveDisks, which are in original form. Because of this,
> md raid devices with such names are not found in exclusiveDisks.
> 
> This patch adds substitution of special characters when comparing
> md_name with names from exlusiveDisks.
> 
> Resolves: rhbz#1096889
> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz at intel.com>

This bug is not approved for 6.6 as of right now. I'll try to make the
magic happen so that it is and this fix can go in. Thanks for the
patches.

Samantha

> ---
>  storage/devicetree.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/storage/devicetree.py b/storage/devicetree.py
> index 310f955..4427206 100644
> --- a/storage/devicetree.py
> +++ b/storage/devicetree.py
> @@ -943,7 +943,7 @@ class DeviceTree(object):
>                 udev_device_get_md_name(info):
>              md_name = udev_device_get_md_name(info)
>              for i in range(0, len(self.exclusiveDisks)):
> -                if re.match("isw_[a-z]*_%s" % md_name, self.exclusiveDisks[i]):
> +                if re.match("isw_[a-z]*_%s" % md_name, re.sub('[ \t]', '_', self.exclusiveDisks[i]).replace('/', '-')):
>                      self.exclusiveDisks[i] = name
>                      return False
>  
> -- 
> 1.8.4.5
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches


More information about the anaconda-patches mailing list