Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1404969 Details for
Bug 1548265
Bond and slaves status are wrong when one of the slaves has the host connection
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[PATCH] manager: allow internal reactivation if the master changed
0001-manager-allow-internal-reactivation-if-the-master-ch.patch (text/plain), 3.93 KB, created by
Beniamino Galvani
on 2018-03-06 18:01:14 UTC
(
hide
)
Description:
[PATCH] manager: allow internal reactivation if the master changed
Filename:
MIME Type:
Creator:
Beniamino Galvani
Created:
2018-03-06 18:01:14 UTC
Size:
3.93 KB
patch
obsolete
>From 5b74e27e71c902312e54fc1bf2ab97525fdc6589 Mon Sep 17 00:00:00 2001 >From: Beniamino Galvani <bgalvani@redhat.com> >Date: Tue, 6 Mar 2018 18:08:21 +0100 >Subject: [PATCH] manager: allow internal reactivation if the master changed > >When a master with autoconnect-slaves=yes is activated, it activates >slaves too. Since the master is activating, it means it was >disconnected before and thus its slaves were not active as well. > >However, it could happen that the slave connection was already active >with a different (or no) master. In such case the check in >_internal_activation_auth_done() prevents the activation of the slave >connection. > >The patch addresses this specific case by checking whether the master >of a connection changed since activation and allowing the internal >activation to proceed in such case. It restores the NM 1.8 behavior of >autoconnecting a slave even if the connection is already active >(which, as explained above, can happen only when the master property >of a slave gets changed). > >Fixes: 0922a177385be188b9c9c8ad39c1068533f5a4b3 > >https://bugzilla.redhat.com/show_bug.cgi?id=1548265 >--- > src/nm-manager.c | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > >diff --git a/src/nm-manager.c b/src/nm-manager.c >index 25fb9b7e4..830683545 100644 >--- a/src/nm-manager.c >+++ b/src/nm-manager.c >@@ -3936,16 +3936,33 @@ _new_active_connection (NMManager *self, > return (NMActiveConnection *) nm_act_request_new (settings_connection, > applied, > specific_object, > subject, > activation_type, > device); > } > >+static gboolean >+active_connection_master_changed (NMActiveConnection *ac) >+{ >+ NMConnection *applied; >+ NMSettingsConnection *settings; >+ NMSettingConnection *s_con1, *s_con2; >+ >+ applied = nm_active_connection_get_applied_connection (ac); >+ settings = nm_active_connection_get_settings_connection (ac); >+ s_con1 = nm_connection_get_setting_connection (applied); >+ s_con2 = nm_connection_get_setting_connection (NM_CONNECTION (settings)); >+ nm_assert (s_con1); >+ nm_assert (s_con2); >+ return !nm_streq0 (nm_setting_connection_get_master (s_con1), >+ nm_setting_connection_get_master (s_con2)); >+} >+ > static void > _internal_activation_auth_done (NMActiveConnection *active, > gboolean success, > const char *error_desc, > gpointer user_data1, > gpointer user_data2) > { > _nm_unused gs_unref_object NMActiveConnection *active_to_free = active; >@@ -3964,16 +3981,24 @@ _internal_activation_auth_done (NMActiveConnection *active, > if ( success > && nm_auth_subject_is_internal (nm_active_connection_get_subject (active))) { > c_list_for_each_entry (ac, &priv->active_connections_lst_head, active_connections_lst) { > if ( nm_active_connection_get_device (ac) == nm_active_connection_get_device (active) > && nm_active_connection_get_settings_connection (ac) == nm_active_connection_get_settings_connection (active) > && NM_IN_SET (nm_active_connection_get_state (ac), > NM_ACTIVE_CONNECTION_STATE_ACTIVATING, > NM_ACTIVE_CONNECTION_STATE_ACTIVATED)) { >+ >+ if (active_connection_master_changed (ac)) { >+ nm_log_dbg (LOGD_CORE, >+ "Connection '%s' is already active but master changed, continue activation", >+ nm_active_connection_get_settings_connection_id (ac)); >+ break; >+ } >+ > g_set_error (&error, > NM_MANAGER_ERROR, > NM_MANAGER_ERROR_CONNECTION_ALREADY_ACTIVE, > "Connection '%s' is already active", > nm_active_connection_get_settings_connection_id (active)); > success = FALSE; > break; > } >-- >2.14.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1548265
:
1399675
|
1399678
|
1399679
|
1404969