Repository navigation
Conversation
Binary size report (
|
| Size | |
|---|---|
Base (main) |
4.7MiB |
| PR (#1310) | 4.7MiB |
| Delta | +512B (0.01%) |
Ar-maan05
force-pushed
the
kubevirt-nocloud-route-to-default
branch
from
October 13, 2026 18:02
e149e46 to
b3c48e0
Compare
cloud-init and Netplan accept `default` as a route destination, and
Netplan recommends `routes: [{to: default, via: ...}]` over the
deprecated `gateway4` and `gateway6` keys. The NoCloud parser passed
the v2 `to` and v1 `destination` fields straight to
`IpNetwork::from_str()`, so such a config failed with "invalid address:
default" and the whole network configuration was rejected, leaving the
instance without any network kargs.
Map `default` to `0.0.0.0/0` or `::/0` depending on the address family
of the gateway, the same way cloud-init normalizes it.
Signed-off-by: Armaan Sandhu <armaan.sandhu0504@gmail.com>
Ar-maan05
force-pushed
the
kubevirt-nocloud-route-to-default
branch
from
October 14, 2026 15:18
b3c48e0 to
f6d106d
Compare
This branch has not been deployed
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.
cloud-init and Netplan accept
defaultas a route destination, and Netplan recommendsroutes: [{to: default, via: ...}]over the deprecatedgateway4/gateway6keys. The KubeVirt NoCloud parser passed the v2toand v1destinationfields directly toIpNetwork::from_str(), so user-suppliednetworkDatalike this:made
networks()andrd_network_kargs()fail withinvalid address: default, rejecting the whole network configuration rather than just the route.This adds a small
parse_route_destination()helper used by both the v1 and v2 paths, which mapsdefaultto0.0.0.0/0or::/0based on the address family of the gateway. That matches cloud-init's own normalization in_normalize_net_keys()(cloudinit/net/network_state.py).New v1 and v2 fixtures cover both address families; both tests fail on
mainand pass with this change, and both fixtures passmake validate-fixturesagainst the upstream cloud-init schemas.