You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are still on CloudBase-Init 1.1.4 due to #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:
version: 1
config:
# multiple interfaces or networks so we need a bond/team NIC
- type: physical
name: eth0
mac_address: 52:54:00:00:00:01
mtu: 1450
- type: physical
name: eth1
mac_address: 52:54:00:00:00:02
mtu: 1450
- type: bond
name: Default
mac_address: 52:54:00:00:00:01
bond_interfaces:
- eth0
- eth1
params:
bond-mode: active-backup
xmit_hash_policy: layer2
bond-lacp-rate: false
# multiple networks with vlans
- type: vlan
name: "Default.0"
vlan_link: Default
vlan_id: 0
subnets:
- type: static
address: 192.168.122.200/24
gateway: 192.168.122.1
dns_nameservers:
- 192.168.1.254
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 canonical/cloud-init#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?
We are still on CloudBase-Init 1.1.4 due to #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:
The text was updated successfully, but these errors were encountered: