Skip to content

Commit

Permalink
bump snapd version requirement to 2.65 and remove hacky workaround (#490
Browse files Browse the repository at this point in the history
)

snapd 2.65 is not released yet. We are waiting for it and:
canonical/snapd#14118
to be included
  • Loading branch information
tomponline authored Oct 8, 2024
2 parents 6538593 + 25ca3a1 commit a8b2cb4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 25 deletions.
39 changes: 21 additions & 18 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: lxd
base: core24
assumes:
- snapd2.39
- snapd2.65
version: git
grade: devel
summary: LXD - container and VM manager
Expand Down Expand Up @@ -80,6 +80,9 @@ plugs:
interface: content
content: qemu-external-binaries
target: $SNAP/external/qemu
lxd-support-with-unconfined-mode:
interface: lxd-support
enable-unconfined-mode: true

layout:
/usr/share/libdrm:
Expand All @@ -93,7 +96,7 @@ apps:
command: commands/daemon.activate
daemon: oneshot
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe

daemon:
Expand All @@ -108,7 +111,7 @@ apps:
slots:
- lxd
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- network-bind
- system-observe
sockets:
Expand All @@ -122,7 +125,7 @@ apps:
restart-condition: on-failure
daemon: simple
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- network-bind
- system-observe
sockets:
Expand All @@ -134,68 +137,68 @@ apps:
command: commands/lxc
completer: etc/bash_completion.d/snap.lxd.lxc
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe

lxd:
command: commands/lxd
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe

# Sub-commands
buginfo:
command: commands/buginfo
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe
check-kernel:
command: commands/lxd-check-kernel
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe

hooks:
connect-plug-ceph-conf:
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe
disconnect-plug-ceph-conf:
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe
connect-plug-ovn-certificates:
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe
disconnect-plug-ovn-certificates:
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe
connect-plug-ovn-chassis:
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe
disconnect-plug-ovn-chassis:
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe
connect-plug-qemu-external:
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe
disconnect-plug-qemu-external:
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe
configure:
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- network
- system-observe
remove:
plugs:
- lxd-support
- lxd-support-with-unconfined-mode
- system-observe

parts:
Expand Down
7 changes: 0 additions & 7 deletions snapcraft/commands/daemon.start
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ fi
# Detect base name
SNAP_BASE="$(sed -n '/^name:/ s/^name:\s*\(core[0-9]\{2\}\)/\1/p' /meta/snap.yaml)"

# Temporary hack to workaround systemctl reload snap.lxd.daemon
# problem with core24-based LXD snap
if [ "${SNAP_BASE}" = "core24" ]; then
_LXD_SNAP_DEVCGROUP_CONFIG="/var/lib/snapd/hostfs/var/lib/snapd/cgroup/snap.lxd.device"
grep -qxF 'self-managed=true' "${_LXD_SNAP_DEVCGROUP_CONFIG}" || echo 'self-managed=true' >> "${_LXD_SNAP_DEVCGROUP_CONFIG}"
fi

# Wait for appliance configuration
if [ "${LXD_APPLIANCE}" = "true" ]; then
while :; do
Expand Down

0 comments on commit a8b2cb4

Please sign in to comment.