Bug 1907032

Summary: failed to reapply current state of a bond interface
Product: Red Hat Enterprise Linux 8 Reporter: Mingyu Shi <mshi>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: high Docs Contact:
Priority: high    
Version: 8.4CC: ferferna, jiji, jishi, network-qe, till
Target Milestone: rcKeywords: Triaged
Target Release: 8.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 17:42:57 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:
Attachments:
Description Flags
error log none

Description Mingyu Shi 2020-12-12 13:15:40 UTC
Created attachment 1738574 [details]
error log

Description of problem:
Failed to reapply current bond state. Or in a typical scenario, user gets full running state of a bond, modifies some values (e.g change mtu), then commit it. It will also fail.
This works well with nmstate-1.0.0-0.1 and before.

Version-Release number of selected component (if applicable):
nmstate-1.0.0-1.el8.noarch
nispor-1.0.1-2.el8.x86_64
NetworkManager-1.30.0-0.3.el8.x86_64
DISTRO=RHEL-8.4.0-20201212.n.0
Linux hp-dl388g8-08.rhts.eng.pek2.redhat.com 4.18.0-260.el8.x86_64 #1 SMP Wed Dec 9 04:38:29 EST 2020 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:
Nearly 100%

Steps to Reproduce:
ip link add veth1 type veth
echo "---
interfaces:
- name: bond_test
  type: bond
  state: up
  link-aggregation:
    mode: balance-rr
    slaves:
    - veth0
    - veth1" | nmstatectl set
nmstatectl show bond_test > run.yaml
nmstatectl set run.yaml

Actual results:
Failed

Expected results:
No failure

Additional info:

Comment 1 Mingyu Shi 2020-12-12 14:25:52 UTC
It seems that it happens not only on bond, but also on those interfaces with 'port' property, like bridge, vrf, etc.

Comment 2 Fernando F. Mancera 2021-02-20 09:28:50 UTC
(In reply to Mingyu Shi from comment #1)
> It seems that it happens not only on bond, but also on those interfaces with
> 'port' property, like bridge, vrf, etc.

Hi Mingyu, this is an expected behaviour. For controller interfaces (bridges, bond, vrf..) we are enabling the NetworkManager property "autoconnect-slaves". If this property is enabled, NetworkManager cannot reapply. I would not consider this a bug.

Comment 3 Fernando F. Mancera 2021-05-06 10:57:50 UTC
(In reply to Fernando F. Mancera from comment #2)
> (In reply to Mingyu Shi from comment #1)
> > It seems that it happens not only on bond, but also on those interfaces with
> > 'port' property, like bridge, vrf, etc.
> 
> Hi Mingyu, this is an expected behaviour. For controller interfaces
> (bridges, bond, vrf..) we are enabling the NetworkManager property
> "autoconnect-slaves". If this property is enabled, NetworkManager cannot
> reapply. I would not consider this a bug.

I don't know why I commented this but it is incorrect. The current bug does not refer to "reapply" operation but to apply the same state twice. I am investigating this and will work on it. Thanks!

Comment 4 Fernando F. Mancera 2021-06-16 21:04:22 UTC
This has been fixed by some changes done recently for bonding/bridges. This need to be covered by tests.

Comment 8 Mingyu Shi 2021-06-29 06:40:02 UTC
Verified with versions:
nmstate-1.1.0-0.5.alpha4.el8.noarch
nispor-1.1.1-1.el8.x86_64
NetworkManager-1.32.0-1.el8.x86_64

Comment 10 errata-xmlrpc 2021-11-09 17:42:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (nmstate bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:4157