Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2082034

Summary: Failed deleting ovs-bridge with internal and system port
Product: Red Hat Enterprise Linux 9 Reporter: Quique Llorente <ellorent>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: high Docs Contact:
Priority: unspecified    
Version: 9.1CC: ferferna, jiji, jishi, network-qe, till
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 10:00:44 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 Quique Llorente 2022-05-05 09:18:32 UTC
Description of problem:
Creating an OVS bridge with a system port of a dhcp aware interface and internal port with the same ipv4/ipv6 configuration works fine, but trying to remove the bridge by marking as "absent" the ovs-port and ovs-interface fails since the ethernet interfaces is still marked as slave


[2022-05-05T09:00:43Z ERROR nmstate::nm::nm_dbus::nm_api] org.freedesktop.NetworkManager.UnknownDevice: Can not find a master for eth0: Master connection not found or invalid
NmstateError: Bug: DbusConnectionError: org.freedesktop.NetworkManager.UnknownDevice: Can not find a master for eth0: Master connection not found or invalid dbus: Some(MethodError("org.freedesktop.NetworkManager.UnknownDevice", Some("Can
 not find a master for eth0: Master connection not found or invalid"), Msg { type: Error, sender: ":1.262", reply-serial: 32, body: Signature: [


the "nmcli c show eth0" shows that the interfaces has still a master

connection.master:                      afc746ae-96de-4792-a11c-81e9861033c0
connection.slave-type:                  ovs-port
 

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


How reproducible: Always


Steps to Reproduce:
1. 
cat << EOF | nmstatectl apply
{"interfaces": [{
    "name": "br-ex",
    "type": "ovs-interface",
    "state": "up",
    "mac-address": "52:54:00:8D:57:6B",
    "mtu": "1500",
    "ipv4": {
  "enabled": true,
  "dhcp": true,
  "address": [
    {
      "ip": "192.168.122.63",
      "prefix-length": 24
    }
  ],
  "auto-dns": true,
  "auto-gateway": true,
  "auto-routes": true,
  "auto-route-table-id": 0
},
    "ipv6": {
  "enabled": true,
  "dhcp": false,
  "autoconf": false
}
  }, {
    "name": "br-ex",
    "type": "ovs-bridge",
    "state": "up",
    "bridge": {
      "port": [
        {"name": "eth0"},
        {"name": "br-ex"}
      ]
    }}
]}
EOF
2. 
cat << EOF | nmstatectl apply
{"interfaces": [
{"name": "eth0", "state": "up"},
{
    "name": "br-ex",
    "type": "ovs-interface",
    "state": "absent"
},
{
    "name": "br-ex",
    "type": "ovs-bridge",
    "state": "absent"
}
]}
EOF

Actual results:
ovs bridge and interfaces are removed but eth0 is not up with an address.


Expected results:
eth0 going up and have an address

Additional info:

This has being tested with kcli[1] running the following plan:
configure-ovs:
 type: vm
 image: fedora35
 memory: 8192
 cmds:  
   - echo fedora | passwd --stdin fedora
   - echo root | passwd --stdin root
   - dnf install -b -y git vim openvswitch NetworkManager-ovs dnf-plugins-core jq
   - systemctl enable openvswitch
   - systemctl start openvswitch
   - systemctl restart NetworkManager
   - dnf copr enable -y nmstate/nmstate-git 
   - dnf install -y nmstate
   - git clone https://github.com/qinqon/configure-ovs-nmstate

[1] https://kcli.readthedocs.io/


To recover from it the the NetworkManager connections has to be removed and interfaces activated with ip l

Comment 2 Gris Ge 2022-05-06 08:08:07 UTC
Patch sent to upstream: https://github.com/nmstate/nmstate/pull/1894


Please be aware, with desire state asking absent ovs-bridge, nmstate just convert eth1 back to ip.method disabled and no controller. If you need eth1 changed to DHCP mode, please state that in desire state. This bug only fix the left over of invalid connection.master setting of orphan OVS system interface.

Comment 3 Quique Llorente 2022-05-06 08:15:53 UTC
Thanks, we will deal with restoring interface state correctly.

Comment 4 Fernando F. Mancera 2022-05-16 19:07:12 UTC
Tested with integration tests and manually. It works as expected.

Comment 7 Mingyu Shi 2022-06-15 02:25:54 UTC
Verified with:
nmstate-2.1.1-0.alpha.20220602.5accbd1.el9.x86_64

eth0 keeps managed, no connection.master value.

Comment 9 errata-xmlrpc 2022-11-15 10:00:44 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