Loading Ubuntu-core in MAAS fails

Hi All,

I am trying to load the ubuntu-core images into MAAS and using the below script to do the same.

https://gist.github.com/ThinGuy/c306252c9b89ffed35ed6b457ef099ae

Everything seems to be successful when I execute the script, but when I execute below command I dont see the same.

$ maas maasuser boot-resources read -d
200 OK

Connection: keep-alive
Content-Length: 5251

Content-Location: http://localhost:5240/MAAS/api/2.0/boot-resources/
  Content-Type: application/json; charset=utf-8
          Date: Fri, 25 Aug 2023 21:45:15 GMT
        Server: nginx/1.18.0 (Ubuntu)
        Status: 200
          Vary: Authorization, Cookie
 X-Frame-Options: DENY
 X-Maas-Api-Hash: 1d020ba276dee29a88822f085bea1125af4cff1b

Success.

Machine-readable output follows:

[
{
    "id": 1,
    "type": "Synced",
    "name": "grub-efi-signed/uefi",
    "architecture": "amd64/generic",
    "resource_uri": "/MAAS/api/2.0/boot-resources/1/"
},
{
    "id": 2,
    "type": "Synced",
    "name": "grub-efi/uefi",
    "architecture": "arm64/generic",
    "resource_uri": "/MAAS/api/2.0/boot-resources/2/"
},
{
    "id": 3,
    "type": "Synced",
    "name": "grub-ieee1275/open-firmware",
    "architecture": "ppc64el/generic",
    "resource_uri": "/MAAS/api/2.0/boot-resources/3/"
},
{
    "id": 4,
    "type": "Synced",
    "name": "pxelinux/pxe",
    "architecture": "i386/generic",
    "resource_uri": "/MAAS/api/2.0/boot-resources/4/"
},
{
    "id": 5,
    "type": "Synced",
    "name": "ubuntu/focal",
    "architecture": "amd64/ga-20.04",
    "resource_uri": "/MAAS/api/2.0/boot-resources/5/",
    "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04,ga-18.10,ga-19.04,ga-19.10,ga-20.04"
},
{
    "id": 6,
    "type": "Synced",
    "name": "ubuntu/focal",
    "architecture": "amd64/ga-20.04-lowlatency",
    "resource_uri": "/MAAS/api/2.0/boot-resources/6/",
    "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04,ga-18.10,ga-19.04,ga-19.10,ga-20.04"
},
{
    "id": 7,
    "type": "Synced",
    "name": "ubuntu/focal",
    "architecture": "amd64/hwe-20.04",
    "resource_uri": "/MAAS/api/2.0/boot-resources/7/",
    "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04,ga-18.10,ga-19.04,ga-19.10,ga-20.04"
},
{
    "id": 8,
    "type": "Synced",
    "name": "ubuntu/focal",
    "architecture": "amd64/hwe-20.04-edge",
    "resource_uri": "/MAAS/api/2.0/boot-resources/8/",
    "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04,hwe-18.10,hwe-19.04,hwe-19.10,hwe-20.04"
},
{
    "id": 9,
    "type": "Synced",
    "name": "ubuntu/focal",
    "architecture": "amd64/hwe-20.04-lowlatency",
    "resource_uri": "/MAAS/api/2.0/boot-resources/9/",
    "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04,ga-18.10,ga-19.04,ga-19.10,ga-20.04"
},
{
    "id": 10,
    "type": "Synced",
    "name": "ubuntu/focal",
    "architecture": "amd64/hwe-20.04-lowlatency-edge",
    "resource_uri": "/MAAS/api/2.0/boot-resources/10/",
    "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04,hwe-18.10,hwe-19.04,hwe-19.10,hwe-20.04"
},
{
    "id": 11,
    "type": "Synced",
    "name": "ubuntu/jammy",
    "architecture": "amd64/ga-22.04",
    "resource_uri": "/MAAS/api/2.0/boot-resources/11/",
    "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04,ga-18.10,ga-19.04,ga-19.10,ga-20.04,ga-20.10,ga-21.04,ga-21.10,ga-22.04"
},
{
    "id": 12,
    "type": "Synced",
    "name": "ubuntu/jammy",
    "architecture": "amd64/ga-22.04-lowlatency",
    "resource_uri": "/MAAS/api/2.0/boot-resources/12/",
    "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04,ga-18.10,ga-19.04,ga-19.10,ga-20.04,ga-20.10,ga-21.04,ga-21.10,ga-22.04"
},
{
    "id": 13,
    "type": "Synced",
    "name": "ubuntu/jammy",
    "architecture": "amd64/hwe-22.04",
    "resource_uri": "/MAAS/api/2.0/boot-resources/13/",
    "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04,ga-18.10,ga-19.04,ga-19.10,ga-20.04,ga-20.10,ga-21.04,ga-21.10,ga-22.04"
},
{
    "id": 14,
    "type": "Synced",
    "name": "ubuntu/jammy",
    "architecture": "amd64/hwe-22.04-edge",
    "resource_uri": "/MAAS/api/2.0/boot-resources/14/",
    "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04,hwe-18.10,hwe-19.04,hwe-19.10,hwe-20.04,hwe-22.04"
},
{
    "id": 15,
    "type": "Synced",
    "name": "ubuntu/jammy",
    "architecture": "amd64/hwe-22.04-lowlatency",
    "resource_uri": "/MAAS/api/2.0/boot-resources/15/",
    "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04,ga-18.10,ga-19.04,ga-19.10,ga-20.04,ga-20.10,ga-21.04,ga-21.10,ga-22.04"
},
{
    "id": 16,
    "type": "Synced",
    "name": "ubuntu/jammy",
    "architecture": "amd64/hwe-22.04-lowlatency-edge",
    "resource_uri": "/MAAS/api/2.0/boot-resources/16/",
    "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04,hwe-18.10,hwe-19.04,hwe-19.10,hwe-20.04,hwe-22.04"
}

]

Looks like issue is with the script.
When I try the individual commands it works …

Hi @codingfreak, thanks for sharing this resource! You might want to comment on the gist as well so that the author of the script can update it.

Cheers!