-
Notifications
You must be signed in to change notification settings - Fork 11
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
patch: Install lxd snap on runner #262
Conversation
ubuntu-24.04 image, unlike 22.04 image, does not have lxd snap pre-installed e.g. Ubuntu 22.04 GitHub runner ``` $ snap list Name Version Rev Tracking Publisher Notes core20 20240705 2379 latest/stable canonical✓ base lxd 5.0.3-80aeff7 29351 5.0/stable/… canonical✓ - snapd 2.63 21759 latest/stable canonical✓ snapd ``` Ubuntu 24.04 GitHub runner ``` $ snap list No snaps are installed yet. Try 'snap install hello-world'. ```
tested on canonical/mysql-operator#572 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tnx!
sudo snap install lxd --channel='${{ inputs.lxd-snap-channel }}' | ||
sudo snap refresh lxd --channel='${{ inputs.lxd-snap-channel }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
install+refresh is not optimal, but safe and fast. LGTM to unblock CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what would you do instead?
snap doesn't provide a single command to install or refresh
imo checking if snap installed is more complicated and error-prone
and install command (currently) does not fail if snap already installed, so seems like the simplest solution
ubuntu-24.04 image, unlike 22.04 image, does not have lxd snap pre-installed
e.g.
Ubuntu 22.04 GitHub runner
Ubuntu 24.04 GitHub runner