Specifying "Global Static Routes" causes cloud-init to fail to parse instance metadata #2170
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/bug
Categorizes issue or PR as related to a bug.
/kind bug
What steps did you take and what happened:
I tried to specify "global static routes" in a clusterclass as this field was available:
cluster-api-provider-vsphere/apis/v1beta1/types.go
Lines 271 to 274 in a2f8e74
Upon inspecting
instance-data.json
, it appears the following instance metadata template was rendered correctly:cluster-api-provider-vsphere/pkg/util/constants.go
Lines 141 to 148 in a2f8e74
But running
journalctl
reveals that cloud-init threw an exception upon finding "routes" in the network config.After reading https://cloudinit.readthedocs.io/en/latest/reference/network-config-format-v2.html#network-config-v2, it does not appear that "routes" was a valid key under "network".
Specifying "routes" per-device works as expected, however.
What did you expect to happen:
Specifying global static routes should either be not supported or translated to a per-device setting somehow.
Anything else you would like to add:
I also tried this with Ubuntu, but the machine did not acquire an IP address so I was unable to SSH in to see the problem. I suspect that the network config was invalid and so it was unable to acquire the static IP set in the instance metadata.
Environment:
kubectl version
): v1.26.5/etc/os-release
): Photon OS 3.0The text was updated successfully, but these errors were encountered: