VM Discovery fails, resulting in " Error: An architecture is required." when composing a LXD VM
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Alberto Donato |
Bug Description
Hello,
When adding LXD as a backend in MAAS it will scan all projects (even if one is selected), resulting in a failure. This failure ultimately results in an error when composing machines "Error: An architecture is required.".
Machine: win10: {
"iso": {
"boot.
"source": "/home/
"type": "disk"
},
"root": {
"path": "/",
"pool": "default",
"size": "40GiB",
"type": "disk"
}
}
The issue is caused by this line in the LXD driver:
if source:
This check will run on the ISO object, failing with a key error, bubbling up to a failure to discover the LXD backend.
Please find the rackd logs here: https:/
[To Reproduce]
1. Create a VM with an ISO mounted, as configured above
2. Install, setup MAAS
3. Setup the LXD backend
4. Attempt to compose a VM and observe the error "Error: An architecture is required."
[Workaround]
Scan machines in your LXD cluster with something like
for project in "charmcraft" "default" "demos" "infra" "sandbox" "sandboxing" "ws-sandbox"; do for machine in $(lxc list -f csv --project $project -c n); do echo "Machine: $machine: $(lxc config show --project $project $machine | yq .devices)"; done; done;
and dismount the ISO, remove, and re-add the LXD backend, this should resolve the issue.
Thanks,
Peter
Related branches
- Jack Lloyd-Walters: Approve
- MAAS Lander: Approve
-
Diff: 49 lines (+24/-3)2 files modifiedsrc/provisioningserver/drivers/pod/lxd.py (+4/-3)
src/provisioningserver/drivers/pod/tests/test_lxd.py (+20/-0)
description: | updated |
summary: |
VM Discovery fails, resulting in " Error: An architecture is required." - when adding LXD host + when composing a LXD VM |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → 3.3.0 |
assignee: | nobody → Alberto Donato (ack) |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 3.3.0 → 3.3.0-beta1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |