Bug 1966734

Summary: nmstate fail to configure interface when using bond with fail_over_mac
Product: Red Hat Enterprise Linux 8 Reporter: Michael Zamot <mzamot>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED DUPLICATE QA Contact: Mingyu Shi <mshi>
Severity: high Docs Contact:
Priority: high    
Version: 8.3CC: cnv-qe-bugs, ferferna, jiji, jishi, network-qe, phoracek, rkhan, till
Target Milestone: betaKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-03 20:04:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Zamot 2021-06-01 18:44:23 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
Every time

Steps to Reproduce:
1. Deploy OpenShift 4.7.11 using OVNKubernetes, using an Active-Backup bond using fail_over_mac="active".
2. Create a vlan or bridge using nmstate

Actual results:
Bridge and/or VLANs are not created. The error reported is the following:
 message: |-
      error reconciling NodeNetworkConfigurationPolicy at desired state apply: , failed to execute nmstatectl set --no-commit --timeout 480: 'exit status 1' '' '2021-05-25 19:04:05,614 root         DEBUG    Interface br-ex found. Merging the interface information.
      2021-05-25 19:04:05,615 root         DEBUG    Interface br-int found. Merging the interface information.
      2021-05-25 19:04:05,615 root         DEBUG    Interface br-local found. Merging the interface information.
      Traceback (most recent call last):
        File "/usr/bin/nmstatectl", line 11, in <module>
          load_entry_point('nmstate==0.3.4', 'console_scripts', 'nmstatectl')()
        File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 67, in main
          return args.func(args)
        File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 267, in apply
          args.save_to_disk,
        File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 289, in apply_state
          save_to_disk=save_to_disk,
        File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 71, in apply
          net_state = NetState(desired_state, current_state, save_to_disk)
        File "/usr/lib/python3.6/site-packages/libnmstate/net_state.py", line 40, in __init__
          save_to_disk,
        File "/usr/lib/python3.6/site-packages/libnmstate/ifaces/ifaces.py", line 107, in __init__
          iface.pre_edit_validation_and_cleanup()
        File "/usr/lib/python3.6/site-packages/libnmstate/ifaces/bond.py", line 88, in pre_edit_validation_and_cleanup
          self._fix_mac_restriced_mode()
        File "/usr/lib/python3.6/site-packages/libnmstate/ifaces/bond.py", line 114, in _fix_mac_restriced_mode
          "MAC address cannot be specified in bond interface along "
      libnmstate.error.NmstateValueError: MAC address cannot be specified in bond interface along with fail_over_mac active on active backup mode


Expected results:
VLAN or bridge is created instead.

Additional info:
Interface created with:

spec:
  desiredState:
    interfaces:
    - description: vlan interface per https://github.com/nmstate/kubernetes-nmstate/blob/master/docs/user-guide-policy-configure-vlan-and-dynamic-ip.md
      name: bond1.415
      state: up
      type: vlan
      vlan:
        base-iface: bond1
        id: 415
    - bridge:
        options:
          stp:
            enabled: false
        port:
        - name: bond1.415
      description: Linux bridge with bond1 vlan 415 for non-routable BigIP-HA
      name: bigip-ha
      state: up
      type: linux-bridge
  nodeSelector:
    node-role.kubernetes.io/load-balancer: ""

Comment 5 Petr Horáček 2021-06-03 15:59:45 UTC
The fix resolved the issue. We applied it on the faulty cluster and after that, we were able to apply the configure successfully.

Comment 7 Red Hat Bugzilla 2023-09-15 01:08:51 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days