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 1057494

Summary: nmcli: Allow to use connection name of master connection when creating slave
Product: Red Hat Enterprise Linux 7 Reporter: Jiri Pirko <jpirko>
Component: NetworkManagerAssignee: Jirka Klimes <jklimes>
Status: CLOSED CURRENTRELEASE QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: dcbw, jklimes, jpirko, rkhan, thaller, vbenes
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-0.9.9.1-3.git20140313.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:19:45 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:
Bug Depends On:    
Bug Blocks: 1110708    

Description Jiri Pirko 2014-01-24 09:01:34 UTC
[root@rhel7 ~]# nmcli connection add type bridge ifname brtest
Connection 'bridge-brtest' (9abe454b-5e8a-4a6f-9512-5de6853f902e) successfully added.
[root@rhel7 ~]# nmcli connection add type bridge-slave ifname ens8 master bridge-brtest
Connection 'bridge-slave-ens8' (cdea6e22-f0a8-47e7-b2c8-9b4e6b03d6b3) successfully added.
[root@rhel7 ~]# nmcli connection up bridge-slave-ens8
Error: Connection activation failed: Master connection not found or invalid

I would expect that master parameter would accept connection name as well. Also I think that if user specify non-existent master at least a warning should appear.

Comment 1 Dan Williams 2014-01-24 19:31:22 UTC
So the reason we don't allow usage of the connection id/name is that it is intended to be solely a human readable description, and not a permanent identifier.  Connection names are not guaranteed to be unique (partially by design, since they are human readable) and might change if you rename files.  There is also no character restriction (because they are supposed to be human readable) and thus you can put Chinese characters in them or other non-ASCII characters.

The UUID or parent interface name *are* intended to be stable and used for referring to links between connections.  They are restricted to ASCII characters too.

So while I don't believe it's a good idea to allow connection id/name to be used for links between connections, I would certainly entertain ideas on how to make the case you encountered less confusing.

Comment 2 Jirka Klimes 2014-02-05 10:23:47 UTC
Yeah, I think connection name is not a good choice for identifying master.
On the other hand we could make nmcli to accept connection name and translate it to UUID. But there are problems when the name is not unique, or it simply doesn't exist yet (you even wouldn't know if the string user typed should be a connection name or an interface name).

Comment 3 Dan Williams 2014-02-05 14:01:55 UTC
(In reply to Jirka Klimes from comment #2)
> Yeah, I think connection name is not a good choice for identifying master.
> On the other hand we could make nmcli to accept connection name and
> translate it to UUID. But there are problems when the name is not unique, or
> it simply doesn't exist yet (you even wouldn't know if the string user typed
> should be a connection name or an interface name).

Yes, this is a great idea.

Comment 4 Jiri Pirko 2014-02-05 14:08:54 UTC
(In reply to Jirka Klimes from comment #2)
> Yeah, I think connection name is not a good choice for identifying master.
> On the other hand we could make nmcli to accept connection name and
> translate it to UUID. But there are problems when the name is not unique, or
> it simply doesn't exist yet (you even wouldn't know if the string user typed
> should be a connection name or an interface name).

That's what I was thinking of. Looking forward to it.

Comment 5 Jiri Pirko 2014-03-10 14:34:34 UTC
Any news here? I just hit this again forgetting that I should not use connection name :( Seems very natural to me to do so. I'm pretty certain that other users would hit this. Requesting blocker flag. Thanks!

Comment 6 Jirka Klimes 2014-03-11 13:04:44 UTC
The code has been pushed to upstream branch jk/rh1057494-nmcli-master-id

Comment 9 Dan Williams 2014-03-11 17:06:38 UTC
In the code doc for verify_master_for_slave():

"Check whether master is a valid ineterface name, UUID or"

-> interface

The rest looks good.

Comment 10 Jirka Klimes 2014-03-12 09:37:32 UTC
Pushed to upstream master:
5bfaf00 Merge nmcli code accepting 'master' for slaves as connection ID (rh #1057494)
d7e1ec9 cli: accept prefix "ifname/", "uuid/" or "id/" for 'master' argument
90c02ca cli: allow specifying 'master' for slaves as connection ID (rh #1057494)

Comment 12 Ludek Smid 2014-06-13 12:19:45 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Comment 14 Jirka Klimes 2014-07-18 09:52:38 UTC
*** Bug 1029541 has been marked as a duplicate of this bug. ***