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

Make LXD version check more robust #535

Open
mr-cal opened this issue Mar 15, 2024 · 3 comments
Open

Make LXD version check more robust #535

mr-cal opened this issue Mar 15, 2024 · 3 comments
Labels
Enhancement New feature or request triaged We will be doing this

Comments

@mr-cal
Copy link
Collaborator

mr-cal commented Mar 15, 2024

What needs to get done

If LXD version parsing fails, craft-providers should catch the failure and log a warning.

Why it needs to get done

LXD recently changed their version naming convention, which broke craft-providers and had to be fixed via #532. This check should be more robust.

@mr-cal mr-cal added the Enhancement New feature or request label Mar 15, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2619.

This message was autogenerated

@lengau
Copy link
Contributor

lengau commented Apr 11, 2024

From the LXD team (@tomponline):

The CLI output isn't guaranteed to be stable, so perhaps a better way is to use the API directly, i.e.

lxc query /1.0 | jq .environment.server_version
"5.21.1"

The API version server_version didn't change, and instead we added a new server_lts field.

so querying the API directly is the right way to go

@simondeziel
Copy link
Member

Just an FYI, that currently there is a bug in lxd-installer (a kind of shim to dynamically install LXD's snap if it's not present) that prevents the suggested detection mechanism from working.

Until that bug fix is propagated to all supported releases, please make sure to test on systems where the LXD snap is installed rather than rely on lxd-installer to pull it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request triaged We will be doing this
Projects
None yet
Development

No branches or pull requests

3 participants