canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
2.92k stars 871 forks source link

Duplicate mac found with (ovs) bridge #5810

Closed fwiesel closed 1 day ago

fwiesel commented 2 days ago

Bug report

Similar to #3316. If I create an ovs bridge and add the interface to the bridge, the bridge will also have the mac-address of the underlying interface (in my case a bond)

Steps to reproduce the problem

/etc/netplan/50-cloud-init.yaml:

network:
  bonds:
    bond0:
      interfaces
      - enp1..
      - enp2...
      macaddress: mac1
  bridges:
    br-ex:
      dhcp4: true
      interfaces:
     - bond0
     openvswitch: {}
  ethernets:
    enp1:
      match:
         macaddress: mac1
      set-name: enp1
    enp2:
      match:
         macaddress: mac2
      set-name: enp2
  openvswitch: {}
  version: 2
  vlans: {}

Environment details

cloud-init logs

Backtrace is manually copied, as I have no network connectivity:

sources/DataSourceConfigDrive.py:173 (network_config)
sources/helpers/openstack.py:760 (convert_net_json)
net/__init__.py:891 (get_interfaces_by_mac)
net/__init__.py:990 (get_interfaces_by_mac_on_linux)
fwiesel commented 2 days ago

Hmm, I need to look into that myself a bit deeper. It might be that some configuration I have in the image might conflict with what cloud-init is doing.

fwiesel commented 1 day ago

Okay, that one is invalid. It does not appear on the first boot, but only on a second boot. (Which I needed to get my credentials in). Sorry about the noise.