Bug 1310676

Summary: available connection not connected after team slave disconnected because master deleted
Product: Red Hat Enterprise Linux 7 Reporter: Vladimir Benes <vbenes>
Component: NetworkManagerAssignee: Beniamino Galvani <bgalvani>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: aloughla, atragler, bgalvani, lrintel, mleitner, rkhan, sukulkar, thaller
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 13:19:11 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: 1470965    
Attachments:
Description Flags
[PATCH] policy: watch active-connection state to detect autoconnect early failures
none
[PATCH 1/2] core: make auto-connect-blocked-reason more specific
none
[PATCH 2/2] core: unblock failed connections when the master is available none

Description Vladimir Benes 2016-02-22 13:45:55 UTC
Description of problem:
available ethernet connection is not reconnected after team slave connection disconnected due to removed master connection.  

Version-Release number of selected component (if applicable):
NetworkManager-1.0.6-27.el7.x86_64

How reproducible:
alwyas

Steps to Reproduce:
1.create wired connection for eth0
2.create team and team slave for eth0 connection
3.connect team and slave
4.delete team master connection

Actual results:
network disconnected

Expected results:
ethernet connection should be started

Additional info:

Comment 1 Thomas Haller 2016-07-05 14:36:59 UTC
Assigning for now to Lubomir as he was just yesterday looking into activation of team devices.

Comment 2 Beniamino Galvani 2017-09-26 13:57:00 UTC
Created attachment 1331126 [details]
[PATCH] policy: watch active-connection state to detect autoconnect early failures

Comment 3 Thomas Haller 2017-09-26 18:24:47 UTC
(In reply to Beniamino Galvani from comment #2)
> Created attachment 1331126 [details]
> [PATCH] policy: watch active-connection state to detect autoconnect early
> failures

+         nm_assert (g_hash_table_remove (priv->pending_active_connections, ac));

asserts must have no side-effect.

 if (!g_hash_table_remove...)
    nm_assert_not_reached()




+pending_ac_gone (gpointer data, GObject *where_the_object_was)
+{
...
+
+    g_hash_table_remove (priv->pending_active_connections, where_the_object_was);
+    g_object_unref (self);
+}


pretty sure that weak-ref callbacks are invoked only once. Anyway, to be sure, can you do

  if (g_hash_table_remove...
      g_object_unref (self);



otherwise, lgtm

Comment 4 Beniamino Galvani 2017-09-27 11:56:06 UTC
(In reply to Thomas Haller from comment #3)
> asserts must have no side-effect.

> pretty sure that weak-ref callbacks are invoked only once. Anyway, to be
> sure, can you do
> 
>   if (g_hash_table_remove...
>       g_object_unref (self);

Both fixed and applied, thanks.

https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=a1ea422aadffa808dda780e005969ecadb8c260e

Comment 5 Beniamino Galvani 2017-09-28 14:59:29 UTC
THe commit broke some CI tests; moving back to POST and attaching follow-up patches, please review.

Comment 6 Beniamino Galvani 2017-09-28 15:00:18 UTC
Created attachment 1332026 [details]
[PATCH 1/2] core: make auto-connect-blocked-reason more specific

Comment 7 Beniamino Galvani 2017-09-28 15:00:42 UTC
Created attachment 1332027 [details]
[PATCH 2/2] core: unblock failed connections when the master is available

Comment 8 Thomas Haller 2017-09-29 12:48:55 UTC
patches 1+2 lgtm

Comment 9 Beniamino Galvani 2017-09-29 13:42:35 UTC
(In reply to Thomas Haller from comment #8)
> patches 1+2 lgtm

Applied:

https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=1ed9e68af04f70c25d0f7ac8ce396e0773f32910

Comment 11 Vladimir Benes 2017-12-08 10:47:28 UTC
wrong bug :-(

Comment 14 errata-xmlrpc 2018-04-10 13:19:11 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-2018:0778