Bug 2092254

Summary: Fail to apply bond to "absent" while its ports to "down"
Product: Red Hat Enterprise Linux 9 Reporter: Mingyu Shi <mshi>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.1CC: ferferna, jiji, jishi, network-qe, sfaye, till
Target Milestone: rcKeywords: Regression, Triaged
Target Release: 9.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 10:01:03 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
reproducer.sh none

Description Mingyu Shi 2022-06-01 07:54:21 UTC
Created attachment 1885696 [details]
reproducer.sh

Description of problem:
This is a partial regression of https://bugzilla.redhat.com/show_bug.cgi?id=1724465 , now on RHEL 9.1 it failed at the last step "nmstatectl set bond0_absent.yaml"

Version-Release number of selected component (if applicable):
nmstate-2.1.1-0.alpha.20220519.437e4a9.el9.x86_64
DISTRO=RHEL-9.1.0-20220531.0

How reproducible:
Nearly 100%, I saw only one success so far

Steps to Reproduce:
. reproducer.sh

Actual results:
[2022-06-01T07:50:18Z ERROR nmstate::nm::nm_dbus::nm_api] org.freedesktop.NetworkManager.ConnectionNotActive: The connection was not active.
NmstateError: Bug: DbusConnectionError: org.freedesktop.NetworkManager.ConnectionNotActive: The connection was not active. dbus: Some(MethodError("org.freedesktop.NetworkManager.ConnectionNotActive", Some("The connection was not active."), Msg { type: Error, sender: ":1.40", reply-serial: 80, body: Signature: [
        s (115),
] }))

Expected results:
bond0 is removed(including the NM connection)
veth0 and veth1 are deactivated, but the NM connections preserved

Additional info:

Comment 1 Gris Ge 2022-07-03 13:28:24 UTC
Upstream patch posed to https://github.com/nmstate/nmstate/pull/1956


I failed to reproduce the failure but noticed nmstate does not change the NM profile/connection for `state:down` interface.

Above patch make sure nmstate allows you to change the interface configure with `state:down`. For example:

```
---
interfaces:
- name: eth1
  state: down
- name: eth2
  state: down
  ipv4:
    enabled: true
    dhcp: true
- name: bond99
  type: bond
  state: absent
```

Comment 4 Mingyu Shi 2022-08-08 07:33:10 UTC
Verified with:
nmstate-2.1.3-1.el9.x86_64
NetworkManager-1.39.10-1.el9.x86_64

Comment 6 errata-xmlrpc 2022-11-15 10:01:03 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-2022:7991