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

fix(snap): check if LXD is actually installed #1984

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

tigarmo
Copy link
Contributor

@tigarmo tigarmo commented Nov 8, 2024

On recent Ubuntu systems, "lxc" might be "/usr/sbin/lxc", which is provided by the "lxd-installer" package and will install the LXD snap if it's not installed. This installation can then take a long time if the store is having issues.

For the purposes of the configure and remove hooks we don't want to install LXD just to check that it has no stale images, so update the hooks to do some early detection and bail out if LXD is not installed.

Fixes #1982

On recent Ubuntu systems, "lxc" might be "/usr/sbin/lxc", which is provided
by the "lxd-installer" package and will install the LXD snap if it's not
installed. This installation can then take a long time if the store is having
issues.

For the purposes of the configure and remove hooks we *don't* want to install
LXD just to check that it has no stale images, so update the hooks to do some
early detection and bail out if LXD is not installed.

Fixes #1982
@tigarmo tigarmo force-pushed the work/CRAFT-3625-configure-hook-timeout branch from 315a5d0 to 88d9725 Compare November 8, 2024 18:26
@tigarmo tigarmo force-pushed the work/CRAFT-3625-configure-hook-timeout branch from 88d9725 to 933a4d9 Compare November 8, 2024 18:42
@tigarmo tigarmo requested review from lengau and mr-cal November 8, 2024 20:16
Copy link
Contributor

@mr-cal mr-cal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and easy

@mr-cal
Copy link
Contributor

mr-cal commented Nov 8, 2024

@mattculler, you made need to grab this for CRAFT-1483

@mattculler
Copy link
Contributor

@mattculler, you made need to grab this for CRAFT-1483

Thanks, I definitely will!

@tigarmo
Copy link
Contributor Author

tigarmo commented Nov 11, 2024

No idea what's going on with the macos/windows failures

Copy link
Collaborator

@lengau lengau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; thanks!

Gonna bypass the failing Windows/mac tests in this case since it's clearly unrelated.

@lengau lengau merged commit 02539ab into main Nov 12, 2024
18 of 23 checks passed
@lengau lengau deleted the work/CRAFT-3625-configure-hook-timeout branch November 12, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snap configure hook timing out in CI
4 participants