Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cloud-init to enable lxd-agent on Ubuntu releases before 20.04 #12680

Merged

Conversation

simondeziel
Copy link
Member

This adds a workaround for the lack of lxd-agent-loader package in official (ubuntu: and ubuntu-daily:) images for releases before 20.04.

This also document another workaround needed to have lxd-agent working on 16.04 images, namely use the -hwe kernel.

Now that `lxd-agent.service` is triggered by `udev` rules and it no longer
can be installed as hinted by `systemctl`:

```
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).
4) In case of template units, the unit is meant to be enabled with some
   instance name specified.

LXD agent has been installed, reboot to confirm setup.
To start it now, unmount this filesystem and run: systemctl start lxd-agent
```

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
…buntu images

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
@github-actions github-actions bot added the Documentation Documentation needs updating label Dec 17, 2023
Copy link
Contributor

@ru-fu ru-fu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're talking about another workaround (the -hwe kernel) in the description, but I don't see a change related to that?

doc/cloud-init.md Outdated Show resolved Hide resolved
doc/reference/devices_disk.md Outdated Show resolved Hide resolved
…ling for cloud-init

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
@simondeziel simondeziel force-pushed the cloud-init-instances-without-lxd-agent branch from c426f56 to 0abeb2e Compare January 3, 2024 15:55
@simondeziel
Copy link
Member Author

You're talking about another workaround (the -hwe kernel) in the description, but I don't see a change related to that?

It is mentioned in a note and a commented out section in the proposed cloud-init config (see the last commit).

doc/reference/devices_disk.md Outdated Show resolved Hide resolved
@simondeziel simondeziel force-pushed the cloud-init-instances-without-lxd-agent branch from 0abeb2e to cbef8f0 Compare January 3, 2024 16:09
ru-fu
ru-fu previously approved these changes Jan 3, 2024
Copy link
Contributor

@ru-fu ru-fu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

…lxd-agent

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
doc/.wordlist.txt Outdated Show resolved Hide resolved
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
@simondeziel simondeziel force-pushed the cloud-init-instances-without-lxd-agent branch from e650450 to d8d7414 Compare January 4, 2024 16:52
@tomponline tomponline merged commit a244911 into canonical:main Jan 18, 2024
26 checks passed
@simondeziel simondeziel deleted the cloud-init-instances-without-lxd-agent branch January 18, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation needs updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants