diff --git a/snapcraft.yaml b/snapcraft.yaml index eaf42d43..285f66d8 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1,7 +1,7 @@ name: lxd base: core24 assumes: - - snapd2.65 + - snapd2.39 version: git grade: devel summary: LXD - container and VM manager diff --git a/snapcraft/commands/daemon.start b/snapcraft/commands/daemon.start index 19d375b5..1080e126 100755 --- a/snapcraft/commands/daemon.start +++ b/snapcraft/commands/daemon.start @@ -39,6 +39,13 @@ 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