Bug 1310676 - available connection not connected after team slave disconnected because master deleted
available connection not connected after team slave disconnected because mast...
Status: ON_QA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager (Show other bugs)
7.3
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Beniamino Galvani
Desktop QE
:
Depends On:
Blocks: 1470965
  Show dependency treegraph
 
Reported: 2016-02-22 08:45 EST by Vladimir Benes
Modified: 2017-10-27 08:09 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
[PATCH] policy: watch active-connection state to detect autoconnect early failures (6.50 KB, patch)
2017-09-26 09:57 EDT, Beniamino Galvani
no flags Details | Diff
[PATCH 1/2] core: make auto-connect-blocked-reason more specific (4.94 KB, patch)
2017-09-28 11:00 EDT, Beniamino Galvani
no flags Details | Diff
[PATCH 2/2] core: unblock failed connections when the master is available (3.00 KB, patch)
2017-09-28 11:00 EDT, Beniamino Galvani
no flags Details | Diff

  None (edit)
Description Vladimir Benes 2016-02-22 08:45:55 EST
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 10:36:59 EDT
Assigning for now to Lubomir as he was just yesterday looking into activation of team devices.
Comment 2 Beniamino Galvani 2017-09-26 09:57 EDT
Created attachment 1331126 [details]
[PATCH] policy: watch active-connection state to detect autoconnect early failures
Comment 3 Thomas Haller 2017-09-26 14:24:47 EDT
(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 07:56:06 EDT
(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 10:59:29 EDT
THe commit broke some CI tests; moving back to POST and attaching follow-up patches, please review.
Comment 6 Beniamino Galvani 2017-09-28 11:00 EDT
Created attachment 1332026 [details]
[PATCH 1/2] core: make auto-connect-blocked-reason more specific
Comment 7 Beniamino Galvani 2017-09-28 11:00 EDT
Created attachment 1332027 [details]
[PATCH 2/2] core: unblock failed connections when the master is available
Comment 8 Thomas Haller 2017-09-29 08:48:55 EDT
patches 1+2 lgtm
Comment 9 Beniamino Galvani 2017-09-29 09:42:35 EDT
(In reply to Thomas Haller from comment #8)
> patches 1+2 lgtm

Applied:

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

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