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

Revert to requiring old snapd and reintroduce workaround for core24 #703

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: lxd
base: core24
assumes:
- snapd2.64
- snapd2.39
version: git
grade: devel
summary: LXD - container and VM manager
Expand Down
7 changes: 7 additions & 0 deletions snapcraft/commands/daemon.start
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down