Importing boot-resources always bring back the full set of resources
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Triaged
|
Medium
|
Unassigned |
Bug Description
I'd like to bootstrap MAAS as quickly as possible so I want to fetch as few boot-resources as possible. I need Jammy ga-22.04 for amd64 only so here's what I try to get that only:
```
# maas admin boot-source-
Success.
Machine-readable output follows:
{
"os": "ubuntu",
"release": "jammy",
"arches": [
"amd64"
],
"subarches": [
"ga-22.04"
],
"labels": [
"*"
],
"boot_
"id": 2,
"resource_uri": "/MAAS/
}
# maas admin boot-resources import
```
However, the `import` brings back the full set of images:
```
# maas admin boot-resources read | jq -r '.[] | select(.name | contains(
{
"id": 17,
"type": "Synced",
"name": "ubuntu/jammy",
"architecture": "amd64/ga-22.04",
"resource_uri": "/MAAS/
"subarches": "generic,
}
{
"id": 25,
"type": "Synced",
"name": "ubuntu/jammy",
"architecture": "amd64/
"resource_uri": "/MAAS/
"subarches": "generic,
}
{
"id": 26,
"type": "Synced",
"name": "ubuntu/jammy",
"architecture": "amd64/hwe-22.04",
"resource_uri": "/MAAS/
"subarches": "generic,
}
{
"id": 27,
"type": "Synced",
"name": "ubuntu/jammy",
"architecture": "amd64/
"resource_uri": "/MAAS/
"subarches": "generic,
}
{
"id": 28,
"type": "Synced",
"name": "ubuntu/jammy",
"architecture": "amd64/
"resource_uri": "/MAAS/
"subarches": "generic,
}
{
"id": 29,
"type": "Synced",
"name": "ubuntu/jammy",
"architecture": "amd64/
"resource_uri": "/MAAS/
"subarches": "generic,
}
```
# Additional information
```
# snap list maas maas-test-db
Name Version Rev Tracking Publisher Notes
maas 3.3.3-13184-
maas-test-db 14.2-29-g.ed8d7f2 131 3.3/stable canonical✓ -
```
summary: |
- Importing boot-resources always bring back the full set + Importing boot-resources always bring back the full set of resources |
Changed in maas: | |
status: | New → Triaged |
I've followed the same set-up step, output is as expected. selections create 1 os=ubuntu release=jammy arches=amd64 subarches= "ga-22. 04" labels="*" source_ id": 1, api/2.0/ boot-sources/ 1/selections/ 2/"
```
$ maas admin boot-source-
Success.
Machine-readable output follows:
{
"os": "ubuntu",
"release": "jammy",
"arches": [
"amd64"
],
"subarches": [
"ga-22.04"
],
"labels": [
"*"
],
"boot_
"id": 2,
"resource_uri": "/MAAS/
}
```
However, reading back the boot-sources, I've noticed the subarches field now contains a wildcard. My hunch is the import process has introduced that into the selection.
``` selections read 1
"subarches" : [
"boot_ source_ id": 1,
"resource_ uri": "/MAAS/ api/2.0/ boot-sources/ 1/selections/ 2/"
maas admin boot-source-
Success.
Machine-readable output follows:
[ ...
{
"os": "ubuntu",
"release": "jammy",
"arches": [
"amd64"
],
"*"
],
"labels": [
"*"
],
"id": 2,
}
]
```
@sdeziel can you verify your MAAS instance exhibits the same behaviour?