[PATCH/RHEL6-Branch] RHEL 6.6 Upgrade Fails from AttributeError on Multipath (#1129499)

Vratislav Podzimek vpodzime at redhat.com
Fri Feb 27 07:13:04 UTC 2015


On Wed, 2015-02-25 at 16:08 -0500, Robert Marshall wrote:
> Users reported an unhandled AttributeError NoneType while upgrading
> from RHEL6.5 to RHEL6.6. Added a guard against the dev not existing
> when looked up by name. NOTE: in both cases the fail was due to the
> multipath device not being found - this will skip it but based on
> comments on the code it should be ignored anyway and this guard
> will ensure it doesn't crash the installer.
> 
> Resolves rhbz#1129499
> ---
>  booty/x86.py | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/booty/x86.py b/booty/x86.py
> index 90540c5..19ba316 100644
> --- a/booty/x86.py
> +++ b/booty/x86.py
> @@ -48,14 +48,18 @@ class x86BootloaderInfo(efiBootloaderInfo):
>          # physical disks ("hda"), and real partitions on physical disks
>          # ("hda1"). Anything else gets ignored.
>          dev = self.storage.devicetree.getDeviceByName(device)
> -        if dev.type == "mdarray":
> -            if dev.level != 1:
> -                log.error("x86BootloaderInfo.getPhysicalDevices ignoring non "
> -                          "level 1 raid array %s" % dev.name)
> -                return []
> -            devs = dev.parents
> +        if dev:
> +            devs = [dev]
> +            # mdarray is an exception to the general rule
> +            if hasattr(dev, 'type'):
> +                if dev.type == "mdarray":
> +                    if dev.level != 1:
> +                        log.error("x86BootloaderInfo.getPhysicalDevices ignoring non "
> +                                "level 1 raid array %s" % dev.name)
> +                        return []
> +                    devs = dev.parents
>          else:
> -            devs = [ dev ]
> +            return []
>  
>          physicalDevices = []
>          for dev in devs:
Looks good to me now.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list