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 1763054 - connection.interface-name problem with type dummy
Summary: connection.interface-name problem with type dummy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Thomas Haller
QA Contact: Matej Berezny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-18 07:33 UTC by Filip Pokryvka
Modified: 2022-05-10 15:30 UTC (History)
9 users (show)

Fixed In Version: NetworkManager-1.34.0-0.1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 14:54:06 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2022:1985 0 None None None 2022-05-10 14:54:38 UTC
freedesktop.org Gitlab NetworkManager NetworkManager-ci merge_requests 817 0 None None None 2021-08-23 09:35:37 UTC
freedesktop.org Gitlab NetworkManager NetworkManager merge_requests 915 0 None closed [th/device-connect-dummy] fixes for `nmcli device connect` for dummy (and other virtual devices) 2021-07-15 09:43:09 UTC

Description Filip Pokryvka 2019-10-18 07:33:01 UTC
Description of problem:
dummy connections/devices behave differently than other connections/devices

Version-Release number of selected component (if applicable):
1.20.0-3.el8

How reproducible:
always

Steps to Reproduce:
1. nmcli con add type dummy con-name dummy0 ifname '*'
2. nmcli con up id dummy0 ifname dummy1
3. nmcli dev connect dummy1

Actual results:
1. Error: Failed to add 'dummy0' connection: connection.interface-name: property is missing

2.1 if dummy0 is of type dummy, it activates on device saved in connection dummy0, not device dummy1
2.2 if dummy0 is of type generic: Error: device 'dummy1' not compatible with connection 'dummy0': The connection was not a dummy connection..

3. Error: Failed to add/activate new connection: A 'dummy' setting is required.


Expected results:
cases above should work without error

Additional info:
in step 1.) if connection.interface-name '*' is used, then NM add connection, but creates new device named '*'

Comment 1 Beniamino Galvani 2020-04-23 07:15:44 UTC
> Steps to Reproduce:
> 1. nmcli con add type dummy con-name dummy0 ifname '*'
> 2. nmcli con up id dummy0 ifname dummy1
> 3. nmcli dev connect dummy1
>
> Actual results:
> 1. Error: Failed to add 'dummy0' connection: connection.interface-name: property is missing

I think this is expected. A interface name is required for virtual
devices. For some virtual devices like bridges, bonds, teams if
the user doesn't provide an interface name, nmcli generates it:

 # nmcli connection add type bridge con-name bridge+
 Connection 'bridge+' (7f269797-d9f8-42de-9af1-e4a2e18fc62e) successfully added.
 # nmcli -g connection.interface-name connection show bridge+
 nm-bridge

But this behavior doesn't work for all devices and also doesn't seem
particularly useful, because once the user has generated this bridge
with an unknown name, it must discover what name was generated to set
it in slave connections.

> 2.1 if dummy0 is of type dummy, it activates on device saved in connection dummy0, not device dummy1
> 2.2 if dummy0 is of type generic: Error: device 'dummy1' not compatible with connection 'dummy0': The connection was not a dummy connection..
>
> 3. Error: Failed to add/activate new connection: A 'dummy' setting is required.

Steps 2 and 3 assume that the interface-name of a dummy can be unset,
which is not the case (at least, currently).

> Expected results:
> cases above should work without error
>
> Additional info:
> in step 1.) if connection.interface-name '*' is used, then NM add connection, but creates new device named '*'

Yeah, for historical reasons "ifname '*'" means an empty interface
name. If you use the full property name, no conversion is done and the
actual value is used; a interface name of '*' is legitimate.

Comment 3 Filip Pokryvka 2020-10-23 10:30:30 UTC
(In reply to Beniamino Galvani from comment #1)
> >
> > 3. Error: Failed to add/activate new connection: A 'dummy' setting is required.
> 
> Steps 2 and 3 assume that the interface-name of a dummy can be unset,
> which is not the case (at least, currently).

I agree with your comments, that steps 1 and 2 are not supposed to work on virtual devices.

However, step 3 (nmcli dev connect dummy1) does not assume interface-name to be unset. It does not work, even if there is a dummy connection that has interface-name set to dummy1 and is currently down. The problem might be, that NM for dummy connection always creates its dummy interface itself, and can not therefore work with dummy interface created outside NM. If this is a case, please feel free to close this, as it is not a bug.

Comment 4 Beniamino Galvani 2021-03-02 08:43:56 UTC
(In reply to Filip Pokryvka from comment #3)
> However, step 3 (nmcli dev connect dummy1) does not assume interface-name to
> be unset. It does not work, even if there is a dummy connection that has
> interface-name set to dummy1 and is currently down. The problem might be,
> that NM for dummy connection always creates its dummy interface itself, and
> can not therefore work with dummy interface created outside NM. If this is a
> case, please feel free to close this, as it is not a bug.

For some virtual interfaces (for example, veths) "nmcli device connect" creates a new connection and activates it. It would be easy to make it work also for dummy interfaces. I will prepare a patch.

Comment 7 Thomas Haller 2021-07-08 15:26:55 UTC
merged to `main` with [1].

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/e16c50f507703f15a550b4ef80448dcbd3a85131


this is no material to backport to nm-1-32, rhel-8.5 or rhel-9.0-beta.

Instead, it will be in 1.34.0+, rhel-8.6+ and rhel-9.0-GA.

Comment 14 errata-xmlrpc 2022-05-10 14:54:06 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 (NetworkManager 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/RHEA-2022:1985


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