Bug 1360386

Summary: bond slaves of master which is slave of a bridge are sometimes not activated in installer
Product: Red Hat Enterprise Linux 7 Reporter: Radek Vykydal <rvykydal>
Component: NetworkManagerAssignee: Beniamino Galvani <bgalvani>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: atragler, bgalvani, jkoten, lrintel, rkhan, sukulkar, thaller, vbenes
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-1.8.0-0.2.git20170215.1d40c5f4.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 09:17:07 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:
Attachments:
Description Flags
NetworkManager log of working case
none
NetworkManager log of failing case
none
ifcfg files
none
[PATCH] manager: allow slave connection to auto-connect its slaves
none
[PATCH v2] manager: allow slave connection to auto-connect its slaves
none
[PATCH v3] manager: allow slave connection to auto-connect its slaves none

Description Radek Vykydal 2016-07-26 14:47:44 UTC
When working on anaconda bug 1321288 we observe that sometimes bond slaves of master which is enslaved to a bridge are not activated in spite of NetworkManager configured with 

[connection]
connection.autoconnect-slaves=1

in installer.

Comment 1 Radek Vykydal 2016-07-26 14:50:00 UTC
Created attachment 1184294 [details]
NetworkManager log of working case

Sometimes the bond slaves are activated:

NAME                       UUID                                  TYPE            DEVICE..
Bond connection bond0      5da744dd-eb83-43ae-8ecc-f7c6d744b3dd  bond            bond0...
Bridge connection bridge0  90b95d38-dd04-42e2-a7fa-6be802c84f61  bridge          bridge0.
System ens3                67ce3099-826d-486c-a60e-f2fc978a9ec9  802-3-ethernet  ens3....
bond0 slave 1              ee1d7778-1a2e-4645-be62-00bd284a2c56  802-3-ethernet  ens9....
bond0 slave 2              f7b1f7d7-9f5b-427f-b69a-256985819d2f  802-3-ethernet  ens10...
DEVICE   TYPE      STATE      CONNECTION................
bond0    bond      connected  Bond connection bond0.....
bridge0  bridge    connected  Bridge connection bridge0.
ens10    ethernet  connected  bond0 slave 2.............
ens3     ethernet  connected  System ens3...............
ens9     ethernet  connected  bond0 slave 1.............
lo       loopback  unmanaged  --........................

Comment 2 Radek Vykydal 2016-07-26 14:54:25 UTC
Created attachment 1184295 [details]
NetworkManager log of failing case

Sometimes the bond slaves are not activated:

NAME                       UUID                                  TYPE            DEVICE..
Bond connection bond0      4a5c651f-2fb1-45f6-b74b-df3146acde8b  bond            bond0...
Bridge connection bridge0  7616654a-9768-4f0f-b92f-ed38d82c7a9b  bridge          bridge0.
System ens3                77645a09-9a3e-4b21-847e-1b32cfab162c  802-3-ethernet  ens3....
bond0 slave 1              c144a239-85bb-4682-8222-44354cdc6682  802-3-ethernet  --......
bond0 slave 2              e6d8d114-aa73-4224-8e88-f60a251d9b1a  802-3-ethernet  --......
DEVICE   TYPE      STATE      CONNECTION................
bond0    bond      connected  Bond connection bond0.....
bridge0  bridge    connected  Bridge connection bridge0.
ens10    ethernet  connected  --........................
ens3     ethernet  connected  System ens3...............
ens9     ethernet  connected  --........................
lo       loopback  unmanaged  --........................

nmcli con up on the slaves makes the configuration work.

Comment 3 Radek Vykydal 2016-07-26 14:55:44 UTC
Created attachment 1184296 [details]
ifcfg files

ifcfg files created for NM by installer in initramfs

Comment 5 Beniamino Galvani 2016-09-26 19:42:01 UTC
Created attachment 1204946 [details]
[PATCH] manager: allow slave connection to auto-connect its slaves

Comment 6 Thomas Haller 2016-09-27 07:26:38 UTC
+autoconnect_root_quark (void)

use G_DEFINE_QUARK()


+                   _LOGE (LOGD_CORE,
+                          "will NOT activate slave

this doesn't seem to warrant a error message. Especially as activation does not fail in general. Is this really an invalid configuration? Maybe even just <info>.


Rest lgtm

Comment 7 Beniamino Galvani 2016-10-04 12:15:25 UTC
(In reply to Thomas Haller from comment #6)
> +autoconnect_root_quark (void)
> 
> use G_DEFINE_QUARK()
> 
> 
> +                   _LOGE (LOGD_CORE,
> +                          "will NOT activate slave
> 
> this doesn't seem to warrant a error message. Especially as activation does
> not fail in general. Is this really an invalid configuration? Maybe even
> just <info>.

We only check for auto-connect circular dependencies here and thus a INFO level probably is enough. But I expect the activation to fail anyway later (AFAIU the kernel doesn't allow such configurations).

Comment 8 Beniamino Galvani 2016-10-07 13:37:38 UTC
Created attachment 1208158 [details]
[PATCH v2] manager: allow slave connection to auto-connect its slaves

v2: changed log level from error to info.

Comment 9 Thomas Haller 2016-10-07 16:22:43 UTC
+static GQuark
+autoconnect_root_quark (void)
+{
+	static GQuark quark = 0;
+
+	if (G_UNLIKELY (quark == 0))
+		quark = g_quark_from_static_string ("autoconnect-root");
+	return quark;
+}

should be replaced by G_DEFINE_QUARK()

Comment 10 Beniamino Galvani 2016-10-11 08:47:36 UTC
Created attachment 1209036 [details]
[PATCH v3] manager: allow slave connection to auto-connect its slaves

Comment 13 errata-xmlrpc 2017-08-01 09:17:07 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/RHSA-2017:2299