← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1919045] [NEW] wrong HWADDR on interface when ethernet_mac_address is given on the bond

 

Public bug reported:

creating a configuration for an active-backup bond:
```
cloud-init devel net-convert -p network_data.json -k network_data.json \
-d /tmp -D rhel -O sysconfig \
-m eno50,b2:35:4a:42:42:ed -m eno53,b2:35:4a:42:42:ee
```
with cloud-init (cloud-init-19.4-7.el7_9.3.x86_64, cloud-init-20.3-10.el8.noarch)
assuming there is a ethernet_mac_address defined on the bond:
```
    {
      "id": "bond0",
      "type": "bond",
      "ethernet_mac_address": "b2:35:4a:42:42:ed",
      "bond_mode": "active-backup"
      ...
```
we see cloud-init creates a file ifcfg-eno53 wrongly containing a HWADDR with the address of the bond.
For a bond, we expect both interfaces to display the same mac when running ip link (default behavior with fail_over_mac=0 bonding module parameter). However, the HWADDR in the ifcfg file must retain the original mac address of the interface, or the interface is not configured correctly. Practically, it is never configured as slave.

Workaround seems to just remove the "ethernet_mac_address" on the bond
there (I originally added it because it is required according to
https://github.com/openstack/nova/blob/master/doc/api_schemas/network_data.json,
which I was using to validate my network_data file).

I would expect the ifcfg-eno53 mac address to not be impacted by the
presence of ethernet_mac_address on the bond. For reference I attach my
network_data.json if anyone wants to try.

** Affects: cloud-init
     Importance: Undecided
         Status: New

** Attachment added: "network_data.json"
   https://bugs.launchpad.net/bugs/1919045/+attachment/5476324/+files/network_data.json

** Description changed:

  creating a configuration for an active-backup bond:
  ```
  cloud-init devel net-convert -p network_data.json -k network_data.json \
- -d /tmp -D rhel -O sysconfig -m eno50,b2:35:4a:42:42:ed -m eno53,b2:35:4a:42:42:ee
+ -d /tmp -D rhel -O sysconfig \
+ -m eno50,b2:35:4a:42:42:ed -m eno53,b2:35:4a:42:42:ee
  ```
  with cloud-init (cloud-init-19.4-7.el7_9.3.x86_64, cloud-init-20.3-10.el8.noarch)
  assuming there is a ethernet_mac_address defined on the bond:
  ```
-     {
-       "id": "bond0",
-       "type": "bond",
-       "ethernet_mac_address": "b2:35:4a:42:42:ed",
-       "bond_mode": "active-backup"
-       ...
+     {
+       "id": "bond0",
+       "type": "bond",
+       "ethernet_mac_address": "b2:35:4a:42:42:ed",
+       "bond_mode": "active-backup"
+       ...
  ```
  we see cloud-init creates a file ifcfg-eno53 wrongly containing a HWADDR with the address of the bond.
- For a bond, we expect both interfaces to display the same IP when running ip link (default behavior with fail_over_mac=0 bonding module parameter). However, the HWADDR in the ifcfg file must retain the original mac address of the interface, or the interface is not configured correctly. Practically, it is never configured as slave.
+ For a bond, we expect both interfaces to display the same mac when running ip link (default behavior with fail_over_mac=0 bonding module parameter). However, the HWADDR in the ifcfg file must retain the original mac address of the interface, or the interface is not configured correctly. Practically, it is never configured as slave.
  
  Workaround seems to just remove the "ethernet_mac_address" on the bond
  there (I originally added it because it is required according to
  https://github.com/openstack/nova/blob/master/doc/api_schemas/network_data.json,
  which I was using to validate my network_data file).
  
  I would expect the ifcfg-eno53 mac address to not be impacted by the
  presence of ethernet_mac_address on the bond. For reference I attach my
  network_data.json if anyone wants to try.

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1919045

Title:
  wrong HWADDR on interface when ethernet_mac_address is given on the
  bond

Status in cloud-init:
  New

Bug description:
  creating a configuration for an active-backup bond:
  ```
  cloud-init devel net-convert -p network_data.json -k network_data.json \
  -d /tmp -D rhel -O sysconfig \
  -m eno50,b2:35:4a:42:42:ed -m eno53,b2:35:4a:42:42:ee
  ```
  with cloud-init (cloud-init-19.4-7.el7_9.3.x86_64, cloud-init-20.3-10.el8.noarch)
  assuming there is a ethernet_mac_address defined on the bond:
  ```
      {
        "id": "bond0",
        "type": "bond",
        "ethernet_mac_address": "b2:35:4a:42:42:ed",
        "bond_mode": "active-backup"
        ...
  ```
  we see cloud-init creates a file ifcfg-eno53 wrongly containing a HWADDR with the address of the bond.
  For a bond, we expect both interfaces to display the same mac when running ip link (default behavior with fail_over_mac=0 bonding module parameter). However, the HWADDR in the ifcfg file must retain the original mac address of the interface, or the interface is not configured correctly. Practically, it is never configured as slave.

  Workaround seems to just remove the "ethernet_mac_address" on the bond
  there (I originally added it because it is required according to
  https://github.com/openstack/nova/blob/master/doc/api_schemas/network_data.json,
  which I was using to validate my network_data file).

  I would expect the ifcfg-eno53 mac address to not be impacted by the
  presence of ethernet_mac_address on the bond. For reference I attach
  my network_data.json if anyone wants to try.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1919045/+subscriptions


Follow ups