Comment 4 for bug 1978543

Revision history for this message
James Falcon (falcojr) wrote (last edit ):

Thanks Chad for digging in here. Zooming out a little bit, I think there's a bigger mismatch between what's happening here and our docs.

In our v2 config, [1] states (under the routes section): "Each mapping includes a to, via key with an IPv4 or IPv6 address as value." V2 has never promised to be full compatibility with netplan, so if this were happening on a non-netplan system, I would consider the error to be expected behavior.

However, since at the top of the document [2] we claim that "On a system with netplan present, cloud-init will pass Version 2 configuration through to netplan without modification", I think that the real bug here is that we're trying to parse the v2 config at all. I think we should instead check the version number and the renderer, and if it's v2 on netplan, hand the config off directly to netplan without any additional checking.

[1]: https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html#common-properties-for-all-device-types
[2]: https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html#netplan-passthrough