canonical / cloud-init

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

Duplicate mac found with (ovs) bridge #5810

Closed fwiesel closed 1 month ago

fwiesel commented 1 month 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

Generated by cloud-init-local from a configdrive datasource: /etc/netplan/50-cloud-init.yaml:

network:
  bonds:
    bond0:
      interfaces
      - enp1..
      - enp2...
      macaddress: mac1
  ethernets:
    enp1:
      match:
         macaddress: mac1
      set-name: enp1
    enp2:
      match:
         macaddress: mac2
      set-name: enp2
  version: 2

Placed in the image by the administrator (i.e. me): /etc/netplan/70-openvswitch.yaml:

network:
  bonds:
    bond0:
      dhcp4: false
  bridges:
    br-ex:
      dhcp4: true
      interfaces:
     - bond0
     openvswitch: {}
  openvswitch: {}

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 1 month 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 month 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.