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 1998218 - nmstate creates connections with duplicate names
Summary: nmstate creates connections with duplicate names
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nmstate
Version: 9.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: beta
: 9.0 Beta
Assignee: Fernando F. Mancera
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On: 1660250 1998222
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-26 16:03 UTC by Alex Schultz
Modified: 2023-10-15 02:34 UTC (History)
20 users (show)

Fixed In Version: nmstate-2.0.0-0.4.alpha3.el9
Doc Type: No Doc Update
Doc Text:
Clone Of: 1660250
Environment:
Last Closed: 2022-05-17 12:32:35 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate pull 1699 0 None None None 2021-09-02 16:14:24 UTC
Red Hat Issue Tracker NMT-954 0 None None None 2023-10-15 02:34:02 UTC
Red Hat Issue Tracker RHELPLAN-95350 0 None None None 2021-08-26 16:05:48 UTC
Red Hat Product Errata RHEA-2022:2338 0 None None None 2022-05-17 12:32:59 UTC

Description Alex Schultz 2021-08-26 16:03:59 UTC
This bug was created per request in Bug #1660250 Comment 35

Description of problem:

When applying a configuration via nmstatectl, the subsequent connections may be created with duplicate names even though they were previously created with different names.


Version-Release number of selected component (if applicable):
CentOS Stream 9
python3-libnmstate-2.0.0-0.3.alpha2.el9.noarch
nmstate-2.0.0-0.3.alpha2.el9.noarch

How reproducible:
100%

Steps to Reproduce:

nmcli conn add type ovs-bridge conn.interface br-test con-name br-test 
nmcli conn add type ovs-port conn.interface br-test master br-test con-name ovs-port-br-test
nmcli conn add type ovs-interface slave-type ovs-port conn.interface br-test master ovs-port-br-test con-name ovs-if-br-test 
nmcli conn add type ovs-port conn.interface ens4 master br-test con-name ovs-port-ens4
nmcli c add type ethernet conn.interface ens4 master ovs-port-ens4 con-name ovs-if-ens4 
sleep 2

nmcli c
ip a

nmstatectl show > ovs.yaml

nmcli c del ovs-if-ens4
nmcli c del ovs-port-ens4
nmcli c del ovs-if-br-test
nmcli c del ovs-port-br-test
nmcli c del br-test
sleep 2

nmcli c
ip a

nmstatectl apply < ovs.yaml

nmcli c
ip a


Actual results:
[root@multi-0 ~]# nmcli c
NAME              UUID                                  TYPE           DEVICE  
ens3              21d47e65-8523-1a06-af22-6f121086f085  ethernet       ens3    
ovs-if-br-test    4a6f5baf-1ca6-42bf-be5c-f7ee9a3959af  ovs-interface  br-test 
br-test           ff04d669-d9be-4aae-9f39-7a82ddafdad3  ovs-bridge     br-test 
ovs-if-ens4       434569d3-beb3-443c-b3d7-d0280ce987cb  ethernet       ens4    
ovs-port-br-test  5d08a55f-b838-4f05-ac2a-3567f404b175  ovs-port       br-test 
ovs-port-ens4     6e6dc015-c27d-4564-a028-a63d80fcc2f8  ovs-port       ens4  
[root@multi-0 ~]# nmstatectl show > ovs.yaml

<connections deleted>

[root@multi-0 ~]# nmstatectl apply < ovs.yaml
...SNIP...
[root@multi-0 ~]# nmcli c
NAME              UUID                                  TYPE           DEVICE           
ens3              21d47e65-8523-1a06-af22-6f121086f085  ethernet       ens3             
br-test           6ad48c2d-3369-43bc-8994-5925f56e910f  ovs-interface  br-test          
br-test           2918c4f2-e21b-4f8b-a5cc-726404891aa5  ovs-bridge     br-test          
ens4              990fff7a-442e-4330-9895-5841aafa5b6c  ethernet       ens4             
ovs-port-br-test  7c120f2d-a5d8-40fe-b671-bbba5d6c872d  ovs-port       ovs-port-br-test 
ovs-port-ens4     dcccd26c-30ee-48c4-9582-810d733fabce  ovs-port       ovs-port-ens4


Expected results:
The interfaces should not be renamed when applied and should not be duplicated. In this case ens4 was ovs-if-ens4 and the ovs-interface br-test was originally ovs-port-br-test

Comment 1 Fernando F. Mancera 2021-09-02 16:14:24 UTC
Upstream patch: https://github.com/nmstate/nmstate/pull/1699

Comment 2 Gris Ge 2021-09-24 15:24:39 UTC
Tested on base branch(a972b09a1d42b00f4195cacc90e372ea61c50244). Nmstate use `-if` and `-br` postfix for OVS connections in NetworkManager.

Comment 5 Mingyu Shi 2021-11-18 06:40:42 UTC
Verified with versions:
nmstate-2.0.0-0.4.alpha3.el9.noarch
nispor-1.1.1-2.el9.x86_64
NetworkManager-1.32.10-2.el9.x86_64

Use nmstate to create ovs bridges ovs-br[012] and each attached a same named ovs interface, nmstate will postfix -if or -br to differentiate them:
[14:31:52@hp-dl380pg8-13 ~]0# nmcli c
NAME               UUID                                  TYPE           DEVICE            
eno1               9093d0bc-0ad2-4e81-abe4-da414efea0cd  ethernet       eno1              
ovs-br2-if         e40250de-1bdc-4575-9534-44839c3c9383  ovs-interface  ovs-br2           
ovs-br0-br         261b214f-0040-445c-85e7-f5226c13d1d1  ovs-bridge     ovs-br0           
ovs-br0-if         55876039-7903-4d4d-8864-d34c6abeb9f0  ovs-interface  ovs-br0           
ovs-br1-br         b8fd9105-9b7c-4cc7-8e85-6ae69f934cd0  ovs-bridge     ovs-br1           
ovs-br1-if         84608dea-b790-4b74-8fed-0e89c68ea861  ovs-interface  ovs-br1           
ovs-br2-br         9befcfa7-d610-4d7a-bb11-eafc1c9fb1be  ovs-bridge     ovs-br2           
ovs-port-ovs-br0   a496655e-637e-4870-a9a6-452288603bc6  ovs-port       ovs-port-ovs-br0  
ovs-port-ovs-br1   c80502a8-b136-4554-8493-09e3182c661a  ovs-port       ovs-port-ovs-br1  
ovs-port-ovs-br2   0206b978-7b3e-44c6-9819-56af31a8aa74  ovs-port       ovs-port-ovs-br2  
ovs-port-patch0-1  10b2f02d-4874-496b-97a5-2fc160da9f0e  ovs-port       ovs-port-patch0-1 
ovs-port-patch0-2  31cf4c06-90ad-48d7-a357-30e99e6953e9  ovs-port       ovs-port-patch0-2 
ovs-port-patch1-0  0a15de24-aad4-4ea4-ac98-064ab5906f10  ovs-port       ovs-port-patch1-0 
ovs-port-patch1-2  aec3152d-6667-4fe4-97a2-7ea35f20b358  ovs-port       ovs-port-patch1-2 
ovs-port-patch2-0  ccf8a0c0-97f6-46d3-88a4-171d6f136f3b  ovs-port       ovs-port-patch2-0 
ovs-port-patch2-1  6483976c-8cb7-441e-8339-d16c26f85bec  ovs-port       ovs-port-patch2-1 
ovs-port-veth0     c2e2aab2-44b3-4b73-baa5-8f2f537d62a5  ovs-port       ovs-port-veth0    
ovs-port-veth1     de61f360-b5e7-4cef-8695-7eec59d593a3  ovs-port       ovs-port-veth1    
ovs-port-veth2     148163de-9578-48e6-83e1-75d440e327bf  ovs-port       ovs-port-veth2    
patch0-1-if        d064af53-fc9c-4529-b7d0-3147fd56b3d5  ovs-interface  patch0-1          
patch0-2-if        e8f18a40-916c-467a-9ed6-e2cc575d1914  ovs-interface  patch0-2          
patch1-0-if        8042ff36-2e2e-4a87-a19b-bfe96b7c70d8  ovs-interface  patch1-0          
patch1-2-if        3f496896-d815-41b7-b0f2-b58f9a07e6f7  ovs-interface  patch1-2          
patch2-0-if        ea240382-5495-4673-bcdc-6317430b42c6  ovs-interface  patch2-0          
patch2-1-if        128d268d-2214-4229-b78e-39adade54b63  ovs-interface  patch2-1          
veth0              855d7b77-6d76-4c1f-b192-fb5900f3ce8c  ethernet       veth0             
veth1              ca95bf43-1e5f-4fd3-92cf-581e51c7590b  ethernet       veth1             
veth2              1613a4ec-6709-40c9-b9da-dbd224befd07  ethernet       veth2             
eno2               64e46e65-1ace-473e-83df-b0f793bd764d  ethernet       --                
eno3               5be7f0a5-dac1-4d1c-9124-509977dde63a  ethernet       --                
eno4               03ed342e-0ed7-41f6-9341-d8209ae08db9  ethernet       --                
ens1f4             a07c4493-3303-4167-880d-2626262197f4  ethernet       --                
ens1f4d1           c235a0f5-fa6f-497c-8d34-af7af0f1074a  ethernet       --                
ens4f0             f14476fe-a0a1-4634-9af6-9a0f6661c4b1  ethernet       --                
ens4f1             fdf7264e-daff-41c8-ad3d-af6e3c440228  ethernet       --

Comment 9 errata-xmlrpc 2022-05-17 12:32:35 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 (new packages: nmstate), 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/RHEA-2022:2338


Note You need to log in before you can comment on or make changes to this bug.