LXD module requires the non-existing 'lxd' transitional apt-package on Ubuntu 22.04

Bug #2001552 reported by Heino H. Gehlsen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Medium
James Falcon

Bug Description

The lxd cloud-init module relies on a package called 'lxd', which was available in past Ubuntu releases (20.04 and 18.04), but Ubuntu 22.04 has no such package, which makes the cloud-init lxd module fail.

In 20.04 the package was just a transitional package, which simply installs LXD via snapd. As an easy fix, Ubuntu could of cause just provide such package again to comply with cloud-init.

However, according to the cloud-init module documentation, Ubuntu is the only supported platform (limited to 20.04 and 18.04 due to the lack of the package in 22.04). Hence, a way forward could be to modify the lxd module to instead rely on installation via snapd as the default, and implement a fall back to the historic apt packages on the past Ubuntu releases. This could potentially make the module work on other platforms that support snapd.

Also, since LXD could be manually installed via the snap module, a quick fix (that does of cause not provide automatic installation) could be to simply check if the related binaries is available, and if so simply avoid requiring installation of any packages.

Revision history for this message
James Falcon (falcojr) wrote :

Thanks for the bug report. I'm triaging this as high as this represents a regression.

Changed in cloud-init:
status: New → Triaged
importance: Undecided → High
James Falcon (falcojr)
Changed in cloud-init:
assignee: nobody → James Falcon (falcojr)
status: Triaged → In Progress
Revision history for this message
James Falcon (falcojr) wrote :

Looking into this a little deeper now, I'm not sure how this was triggered. What platform/image are you using to make this happen? In 22.04 cloud images, LXD should be installed by default. If LXD is available, the LXD module won't try to install it.

Either way, the module could be improved to be a bit more robust, but in "normal" cases, I'm not seeing how this can happen.

James Falcon (falcojr)
Changed in cloud-init:
importance: High → Medium
Revision history for this message
Heino H. Gehlsen (gehlsen) wrote :

While I am not absolutely sure at this point, I do believe I used the some of the 'default' images provides by LXD/linuxcontainers.org.

Starting container with 'lxc launch images:ubuntu/22.04/cloud test' results in a minimal setup with neither snap nor lxd.

I assume the official counterpart of which you speak should be available via 'lxc launch ubuntu:22.04 test'.

Revision history for this message
James Falcon (falcojr) wrote :

Yes, as far as I'm aware, "images:ubuntu" are community created images and are not supported by Canonical. If you want the Canonical supported cloud images, use "ubuntu:". That said, there is still work to be done here for the case you've raised where lxd and/or snap are not installed.

Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: In Progress → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.