Open neilgierman opened 1 month ago
Linux cloud-init might have a similar issue however have not tried it: https://github.com/canonical/cloud-init/blob/main/cloudinit/net/network_state.py#L738
Hello,
I could reproduce the issue and it looks like a yaml quirk, as the yaml implementation sees the unquoted MAC addresses as integers.
Cloud-init has the same implementation and from a similar bug report, see https://github.com/canonical/cloud-init/issues/3703:
cloud-init suggests in network config docs above that mac_address values should be colon-delimited values such as 04:11:20:54:23:11.
Also, the network-config file is read as yaml, any integer-only values present in yaml will be interpreted as an int instead of strings.
To ensure yaml sees an integer value as a string you would need either single quotes or double quotes around a value.
Is it possible to use single quotes or double quotes around the MAC address?
Thank you, Adrian
We are still on CloudBase-Init 1.1.4 due to https://github.com/cloudbase/cloudbase-init/issues/147. In testing using kvm, I found that if my VM and network-config has a MAC address with only numbers, CloudBase-Init fails to parse it because "int type doesn't have lower function".
Seems there needs to be some protection that if a MAC is of int type, don't try toLower (or always force the incoming MAC to be string).
My network-config:
My virt-install command to bring up the VM:
From error log: