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

Set Target after network/storage lookup (from Incus) #14420

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

markylaing
Copy link
Contributor

In LXD init, if the --storage or --network flags are provided the CLI will check the storage pool or network exists before setting up a device on the instance config. When targeting a cluster group this would lead to calls like GET /1.0/storage-pools/foo?target=@bar which doesn't make sense.

This commit (cherry-picked from Incus) moves setting the cluster group target to after those lookups.

I've added tests have checked that they fail before this change and pass afterwards.

stgraber and others added 2 commits November 8, 2024 10:25
Closes lxc/incus#335

Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit a13184bf72f0d5ad69aa12b7e392bc2c2ff2ec93)
Signed-off-by: Mark Laing <[email protected]>
License: Apache-2.0
@markylaing markylaing self-assigned this Nov 8, 2024
Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

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

Ta

@tomponline tomponline merged commit 35ff15e into canonical:main Nov 11, 2024
27 checks passed
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.

3 participants