forked from juju/juju
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto-switch to configured snap channel for lxd during container init
When we try to initialize support for lxd on a juju machine, the code previously checked if lxd has been installed as a snap and then skipped the dependency installation step (note that settings like snap proxies etc. were still set up as expected). With the introduction of the per-model lxd-snap-channel option, the code has been updated to additionally check whether the installed snap uses the channel configured by the operator. In case of a mismatch, juju will run a 'snap channel' command to switch to the appropriate channel before following the remainder of the initialization steps. It is important to note that the images which juju uses (cosmic+) include a pre-installed snap whose channel includes a branch portion for the specific release (e.g. latest/stable/ubuntu-20.04 on focal). In order to avoid unnecessary channel changes (which trigger snap downloads), the code compares the operator-defined settings to the tracked channel via a prefix match instead of an equality check. This ensures that we can use a sane model default ("latest/stable") that works across all releases.
- Loading branch information
1 parent
0909e6b
commit 8d3053f
Showing
8 changed files
with
204 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.