Skip to content

Commit

Permalink
bin/helpers: use proper channel when installing LXD from custom snap (#…
Browse files Browse the repository at this point in the history
…401)

Before, doing `snap install lxd` would pull LXD `5.21/stable` which is
ATM based on `core22` but chances are that the custom LXD snap provided
is a modern one based on `core24`. As such, you end up pulling `core22`
just for getting your custom snap installable.

Instead, pull the official LXD snap from the requested channel which
still works to give us the assert required to then be able to install
custom LXD snap. This way, a virgin VM won't need to uselessly download
`core22`.
  • Loading branch information
simondeziel authored Jan 30, 2025
2 parents 2120121 + c20b0b4 commit c56c41b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/helpers
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ install_lxd() (
# snapstore then install with --dangerous. The alias needs to be created
# manually too.
if [ -n "${LXD_SNAP_PATH:-}" ]; then
snap list lxd 2>/dev/null || snap install lxd
snap list lxd 2>/dev/null || snap install lxd --channel "${LXD_SNAP_CHANNEL}" --cohort=+
snap install --dangerous "${LXD_SNAP_PATH}"
snap alias lxd.lxc lxc
else
Expand Down

0 comments on commit c56c41b

Please sign in to comment.