Bug 1781165

Summary: NM OVS: Active connection removed before it was initialized
Product: Red Hat Enterprise Linux 8 Reporter: Gris Ge <fge>
Component: NetworkManagerAssignee: sushil kulkarni <sukulkar>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.2CC: atragler, bgalvani, lrintel, rkhan, sukulkar, thaller, till, vbenes
Target Milestone: rc   
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: NetworkManager-1.22.0-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:53:59 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
ovs_bug.sh
none
yml file required to reproduce problem.
none
System logs with NM trace enabled
none
ovs_bug.sh none

Description Gris Ge 2019-12-09 12:58:42 UTC
Description of problem:

When activation a OVS internal interface, it might get error:

error=nm-client-error-quark: Active connection removed before it was initialized

Version-Release number of selected component (if applicable):
NetworkManager-1.20.0-3.el8.x86_64
openvswitch2.11-2.11.0-26.el8fdp.x86_64
nmstate-0.2.0-2.el8

How reproducible:

10%

Steps to Reproduce:
 * sudo bash ./ovs_bug.sh


Actual results:

NM main-loop aborted: Connection activation failed on connection_id ovs0: error=nm-client-error-quark: Active connection removed before it was initialized (2)

Expected results:

No failure.

Additional info:

You might also get failure on timeout hanging at NM_ACTIVE_CONNECTION_STATE_ACTIVATING of ovs0 interface.
I am still debugging it to find out which part(nmstate or NM) might be wrong,
please ignore and start another round of reproduce script.

Comment 1 Gris Ge 2019-12-09 12:59:31 UTC
Created attachment 1643294 [details]
ovs_bug.sh

Reproduce script.

Comment 2 Gris Ge 2019-12-09 13:00:25 UTC
Created attachment 1643295 [details]
yml file required to reproduce problem.

Comment 3 Gris Ge 2019-12-09 13:00:59 UTC
Created attachment 1643296 [details]
System logs with NM trace enabled

Comment 4 Gris Ge 2019-12-09 13:28:49 UTC
Created attachment 1643298 [details]
ovs_bug.sh

Reproduce script

Comment 5 Thomas Haller 2019-12-09 15:49:11 UTC
> <info>  [1575895006.1154] device (ovs0): state change: deactivating -> ip-config (reason 'none', sys-iface-state: 'managed')

this looks wrong.

Comment 6 Gris Ge 2019-12-10 13:08:08 UTC
(In reply to Thomas Haller from comment #5)
> > <info>  [1575895006.1154] device (ovs0): state change: deactivating -> ip-config (reason 'none', sys-iface-state: 'managed')
> 
> this looks wrong.

Anything should I do in nmstate?

Comment 7 Beniamino Galvani 2019-12-11 12:32:01 UTC
(In reply to Gris Ge from comment #6)
> (In reply to Thomas Haller from comment #5)
> > > <info>  [1575895006.1154] device (ovs0): state change: deactivating -> ip-config (reason 'none', sys-iface-state: 'managed')
> > 
> > this looks wrong.
> 
> Anything should I do in nmstate?

No, it's a bug in NM.

The branch at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/358 should fix the state-change problem. It's not clear whether that problem is the cause of the activation failure.

Gris, would you be able to test that NM branch? Should I prepare a scratch build?

Comment 8 Gris Ge 2019-12-12 06:03:46 UTC
(In reply to Beniamino Galvani from comment #7)
> (In reply to Gris Ge from comment #6)
> > (In reply to Thomas Haller from comment #5)
> > > > <info>  [1575895006.1154] device (ovs0): state change: deactivating -> ip-config (reason 'none', sys-iface-state: 'managed')
> > > 
> > > this looks wrong.
> > 
> > Anything should I do in nmstate?
> 
> No, it's a bug in NM.
> 
> The branch at
> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/
> 358 should fix the state-change problem. It's not clear whether that problem
> is the cause of the activation failure.
> 
> Gris, would you be able to test that NM branch? Should I prepare a scratch
> build?

Hi Beniamino,

Thanks for the quick fix.

With your patch, I never see `Active connection removed before it was initialized (2)` error anymore.
Even through there are many other errors which I will create bug to track them soon.

Comment 13 Vladimir Benes 2020-02-21 12:12:22 UTC
covered by the nmstate test executing nmstate's CI.

Comment 15 errata-xmlrpc 2020-04-28 16:53:59 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