MAAS commissioning process should attempt to use LXD socket
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
MAAS 2.7 changed how it was gathering commissioning data to collecting it from LXD. When this was implemented the MAAS team agreed to build a custom binary which outputs the values from various LXD API endpoints so LXD doesn't have to be installed during commissioning.
20.04 LTS and above cloud images include the LXD Snap. The Snap provides a socket to interact with the API, the endpoints MAAS needs don't require LXD to be configured. The LXD API also contains a list of api_extensions which MAAS can use to verify the Snap version of LXD has all the data MAAS requires.
There are two advantages to doing this
1. Commissioning won't have to download the machine-resources binary, saving ~6M per machine.
2. MAAS users will receive LXD fixes quicker. The LXD team releases updates much more frequently than MAAS. A fix to LXD is often out within 2 weeks while it can take a over a month for MAAS to release a fix. LXD also releases a nightly edge Snap, MAAS users could write a custom commissioning script to install the LXD edge Snap and receive LXD fixes the next day.
Essentially 50-maas-
host_info - The base object 50-maas-
curl -G --unix-socket "/var/snap/
resources - Included as a subobject in 50-maas-
curl -G --unix-socket "/var/snap/
networks - For when MAAS starts processing network data from LXD
curl -G --unix-socket "/var/snap/
Changed in maas: | |
milestone: | next → none |
FTR you can use "lxc query /1.0/resources" rather than curl, so you don't have to specify the socket path or other options