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

Sync with latest-edge (latest-candidate) #639

Merged
merged 8 commits into from
Nov 27, 2024

Conversation

tomponline
Copy link
Member

No description provided.

tomponline and others added 8 commits November 27, 2024 09:52
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit 136d7fe)
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
(cherry picked from commit cb9d5d2)
    The PATH inside the snap is configured to prefer /sbin over /bin so the lxd binary will still
    be called by default.

    The lxd-stophook-wrapper script which will be placed into `/bin/lxd`.

    Because containers are configured to call `/snap/lxd/current/bin/lxd callhook` which in turn will be
    routed to `/snap/lxd/current/bin/lxd-user` by the lxd-stophook-wrapper script, which will then connect
    to LXD's unix socket to indicate to the server that the container is stopping.

    Because lxd-user is compiled as a static binary this will work across snap core base changes.

    Also update LXD_EXEC_PATH env var so that LXD will still directly execute itself when needed, rather
    than going via the lxd-stophook wrapper script.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
(cherry picked from commit 75de117)
(cherry picked from commit 74e8bc7)
This command is intended to replace the `lxd` command in the snap so that
existing running containers that are stopping will call this script as part of
their stop hooks.

This will then "route" the command to the `lxd-user` command that will be
statically compiled so that it can connect to the running LXD daemon via
the unix socket to indicate the container is stopping, even after refreshing
the LXD snap to a different core base snap.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
(cherry picked from commit 4d10cbd)
(cherry picked from commit d037e01)
Reverts breakage introduced by 136d7fe

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
(cherry picked from commit d0f1495)
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
(cherry picked from commit c0b8a0d)
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
@tomponline tomponline self-assigned this Nov 27, 2024
@tomponline tomponline marked this pull request as ready for review November 27, 2024 10:41
@tomponline tomponline merged commit 2c8f450 into canonical:latest-candidate Nov 27, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants