CLI: Reject setup in case uplink network's gateway isn't set - #850
Merged
Conversation
Not configuring the gateway on the uplink configures an OVN network without external connectivity. Whilst that might be a valid use case, currently this is not really supported in LXD as you have to provide an uplink network even though it's not used. Until this is supported in LXD, we simply don't allow this type of configuration. Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
roosterfish
force-pushed
the
reject_empty_uplink_addr
branch
2 times, most recently
from
July 4, 2025 08:55
98f9035 to
05d0c63
Compare
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
In case the asker is using a validator, make sure it's error message can be displayed to the user. Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
roosterfish
force-pushed
the
reject_empty_uplink_addr
branch
from
July 4, 2025 09:33
05d0c63 to
b915432
Compare
tomponline
approved these changes
Jul 4, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not configuring the gateway on the uplink configures an OVN network without external connectivity.
Whilst that might be a valid use case, currently this is not really supported in LXD as you have to provide an uplink network even though it's not used.
Until this is supported in LXD, we simply don't allow this type of configuration.
Furthermore the asker's error message printer is modified to allow passing underlying errors to the user for better understanding why an input might be invalid.