← Back to team overview

sts-sponsors team mailing list archive

Re: [Merge] ~igor-brovtsin/maas:dgx-deployment-fixes into maas:master

 

Review: Approve

It's hard to understand everything in the diff, but it looks sane as far as I can see. Let's get it landed and see if anything breaks.

Added a minor inline comment.

Diff comments:

> diff --git a/src/maasserver/preseed.py b/src/maasserver/preseed.py
> index 8e9a8ed..94d77c0 100644
> --- a/src/maasserver/preseed.py
> +++ b/src/maasserver/preseed.py
> @@ -453,20 +464,22 @@ def get_curtin_image(node, osystem=None, series=None):
>      # an older one. e.g Xenial hwe-16.04 will match for ga-16.04. First
>      # try to find the subarch we are deploying, if that isn't found allow
>      # a newer version.
> -    for image in images:
> -        if (
> -            image["purpose"] == "xinstall"
> -            and image["subarchitecture"] == subarch
> -        ):
> -            return image
> -    for image in images:
> -        if image["purpose"] == "xinstall":
> -            return image
> +    for check in (
> +        lambda i: i["subarchitecture"] == platform,
> +        lambda i: "platform" in i and i["platform"] == platform,
> +        lambda i: "supported_platforms" in i
> +        and platform in i["supported_platforms"].split(","),
> +        lambda i: True,

Why is this last check needed?

> +    ):
> +        for image in images:
> +            if image["purpose"] == "xinstall" and check(image):
> +                return image
> +
>      raise MissingBootImage(
>          "Error generating the URL of curtin's image file.  "
>          "No image could be found for the given selection: "
>          "os=%s, arch=%s, subarch=%s, series=%s, purpose=xinstall."
> -        % (osystem, arch, subarch, series)
> +        % (osystem, arch, platform, series)
>      )
>  
>  


-- 
https://code.launchpad.net/~igor-brovtsin/maas/+git/maas/+merge/442660
Your team MAAS Committers is subscribed to branch maas:master.



References