Bug 1804350

Summary: ActivateConnection() for a software device fails immediately after AddConnection()
Product: Red Hat Enterprise Linux 8 Reporter: Beniamino Galvani <bgalvani>
Component: NetworkManagerAssignee: Beniamino Galvani <bgalvani>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: acardace, atragler, bgalvani, edwardh, fge, fpokryvk, lrintel, pasik, rkhan, sukulkar, thaller, vbenes
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-1.22.8-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:54:14 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: 1738136    
Attachments:
Description Flags
Reproducer none

Description Beniamino Galvani 2020-02-18 18:03:51 UTC
Created attachment 1663871 [details]
Reproducer

Description of problem:

The attached reproducer calls AddConnection() and then ActivateConnection(). The second call fails because the unrealized device is not created yet:

   dbus.exceptions.DBusException: org.freedesktop.NetworkManager.UnknownDevice: Failed to find a compatible device for this connection

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

A similar issue was also found in nmstate CI tests:

  <debug> [1582042497.4600] ++ connection 'new connection' (0x5647aa8466a0/NMSimpleConnection/"ovs-port"): [/org/freedesktop/NetworkManager/Settings/112]
  <debug> [1582042497.4600] ++ connection                [ 0x5647aa7ebde0 ]
  <debug> [1582042497.4600] ++ connection.autoconnect-slaves = ((NMSettingConnectionAutoconnectSlaves) NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_YES)
  <debug> [1582042497.4600] ++ connection.id             = 'ovs-port-eth1'
  <debug> [1582042497.4600] ++ connection.interface-name = 'ovs-port-eth1'
  <debug> [1582042497.4600] ++ connection.master         = 'brtest0'
  <debug> [1582042497.4600] ++ connection.permissions    = []
  <debug> [1582042497.4600] ++ connection.slave-type     = 'ovs-bridge'
  <debug> [1582042497.4600] ++ connection.type           = 'ovs-port'
  <debug> [1582042497.4600] ++ connection.uuid           = '5b7262db-9c6a-4c5c-afab-3c2739b46b27'
  <info>  [1582042497.4609] audit: op="connection-add" uuid="5b7262db-9c6a-4c5c-afab-3c2739b46b27" name="ovs-port-eth1" pid=1496 uid=0 result="success"
  <debug> [1582042497.4610] Saving secrets for connection /org/freedesktop/NetworkManager/Settings/112 (ovs-port-eth1)
  <info>  [1582042497.4636] audit: op="connection-activate" uuid="5b7262db-9c6a-4c5c-afab-3c2739b46b27" name="ovs-port-eth1" result="fail" reason="Failed to find a compatible device for this connection"
  <debug> [1582042497.4665] dispatcher: (872) /etc/NetworkManager/dispatcher.d/11-dhclient succeeded
  <debug> [1582042497.4666] manager: (brtest0) already created virtual interface name brtest0
  <debug> [1582042497.4667] device[a55b0b96132b5c68] (ovs-port-eth1): constructed (NMDeviceOvsPort)
  <debug> [1582042497.4667] manager: (ovs-port-eth1) create virtual device ovs-port-eth1

Comment 5 Vladimir Benes 2020-02-26 14:40:41 UTC
altered bond_dbus_creation test to catch this too.

Comment 7 errata-xmlrpc 2020-04-28 16:54:14 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, 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-2020:1847