Controllers report Ubuntu Core version in the Snap
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Lee Trager | ||
snapd |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When region or rack controllers send what operating system they are on they are reporting the Ubuntu core version, not the operating system that is actually running.
LXD is able to get this information correctly when running in a Snap. I recently migrated the controller code to use the same LXD library to get OS information. MAAS is missing some Snap permission which the LXD has as the same code path is being used.
$ sudo curl -G --unix-socket "/var/snap/
Ubuntu 20.04
$ maas $PROFILE rack-controllers read | jq -r '.[] | .osystem + " " + .distro_series'
ubuntu-core 18
If an LXD Pod is added this causes the OS information to flip between the Ubuntu Core version the Snap uses and the Ubuntu version the OS is using as this information is refreshed for the controller and Pod.
Related branches
- Alberto Donato (community): Approve
- MAAS Lander: Approve
-
Diff: 300 lines (+118/-35)5 files modifiedsrc/machine-resources/Makefile (+2/-2)
src/machine-resources/src/machine-resources/Gopkg.lock (+12/-15)
src/machine-resources/src/machine-resources/main.go (+79/-11)
src/metadataserver/builtin_scripts/hooks.py (+5/-1)
src/metadataserver/builtin_scripts/tests/test_hooks.py (+20/-6)
description: | updated |
Changed in maas: | |
milestone: | 2.8.0b3 → 2.8.0rc1 |
description: | updated |
Changed in maas: | |
assignee: | nobody → Lee Trager (ltrager) |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
milestone: | 2.8.0b4 → 2.8.0rc1 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Changed in snapd: | |
status: | Incomplete → Invalid |
Adding snapd as it appears LXD can get this information through a special permission to get host information. MAAS needs a simple interface which just gives read-only access to /etc/os-release on the host. This will help bring feature parity between the MAAS Debian package and Snap package.