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 2094805

Summary: Unmanaged interfaces become managed in nmstate rust
Product: Red Hat Enterprise Linux 9 Reporter: Mingyu Shi <mshi>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: ferferna, jiji, jishi, network-qe, sfaye, till
Target Milestone: rcKeywords: Regression, Reopened, Triaged
Target Release: ---Flags: pm-rhel: mirror+
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-08 10:34:25 UTC
Created attachment 1887995 [details]
reproducer.sh

Description of problem:
This is an extended test of https://bugzilla.redhat.com/show_bug.cgi?id=1932247.
When the interface is not listed under "interfaces" key, nmstaet python will keep it unmanged, but nmstate rust automatically manages it. 

Version-Release number of selected component (if applicable):
nmstate-2.1.1-0.alpha.20220602.5accbd1.el9.x86_64
NetworkManager-1.39.5-1.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
./reproducer.sh

Actual results:
# nmcli dev | grep connected
eno1       ethernet       connected  smyle       
bond0      bond           connected  bond0       
br0        bridge         connected  br0         
dummy0     dummy          connected  dummy0      
veth0      ethernet       connected  veth0       
veth1      ethernet       connected  veth1       
veth3      ethernet       connected  veth3       
ovsbr0     ovs-bridge     connected  ovsbr0-br   
ovsbr0     ovs-interface  connected  ovsbr0-if   
ovsbr0     ovs-port       connected  ovsbr0-port 
vrf0       vrf            connected  vrf0

Expected results:
All the veth should stay unmanaged, just like on RHEL 8.7:
# nmcli dev | grep connected
ens3       ethernet       connected  ens3        
bond0      bond           connected  bond0       
br0        bridge         connected  br0         
dummy0     dummy          connected  dummy0      
ovsbr0     ovs-bridge     connected  ovsbr0-br   
ovsbr0     ovs-interface  connected  ovsbr0-if   
ovsbr0     ovs-port       connected  ovsbr0-port 
vrf0       vrf            connected  vrf0

Additional info:

Comment 1 Mingyu Shi 2022-06-08 10:40:01 UTC
Another consequence is, after run the reproducer, cannot remove ovsbr0 with rust(works well with python)
echo "
interfaces:
  - name: ovsbr0
    type: ovs-interface
    state: absent
  - name: ovsbr0
    type: ovs-bridge
    state: absent
" | nmstatectl apply

[2022-06-08T10:38:08Z ERROR nmstate::ifaces::inter_ifaces] VerificationError: Absent/Down interface ovsbr0/ovs-bridge still found as OvsBridge(OvsBridgeInterface { base: BaseInterface { name: "ovsbr0", description: None, prop_list: ["ovsdb"], iface_type: OvsBridge, state: Up, mac_address: None, permanent_mac_address: None, mtu: None, ipv4: None, ipv6: None, controller: None, accept_all_mac_addresses: None, copy_mac_from: None, ovsdb: Some(OvsDbIfaceConfig { external_ids: Some({}) }), ieee8021x: None, lldp: None, ethtool: None, controller_type: None, up_priority: 0, routes: None, rules: None, _other: {} }, bridge: None })

Comment 2 Gris Ge 2022-08-04 02:17:19 UTC
Hi Mingyu,

In your reproducer, you listed `veth1` as port of bridge, this indicate you want Nmstate to managed it.
That's the reason we set it as managed.

In original bug #1932247, the reporter does not included unmanaged/ignored interface in the bridge port list.

The design of nmstate is only touch interface mentioned in desire state interface list or port list.
What was working well in python code might be a bug.

Do you agree on closing this bug as not a bug?

Comment 3 Gris Ge 2022-08-04 07:28:11 UTC
Closing with consent of reporter.

Comment 4 Gris Ge 2022-08-06 11:27:56 UTC
Reopening.

Will try to ignore bridge port if interfaces section marked(or inherent) as ignored.

Comment 6 Gris Ge 2022-08-08 05:38:25 UTC
Patch sent to upstream: https://github.com/nmstate/nmstate/pull/2002

Comment 10 Mingyu Shi 2022-08-29 03:32:31 UTC
Verified with:
nmstate-2.2.0-0.20220824093819832661.pr2015.11.g225cf980.el9.x86_64
NetworkManager-1.39.90-1.el9.x86_64

Comment 12 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