Bug 1375705

Summary: Trying to bring up a team slave without the team plugin gives unhelpful error message
Product: [Fedora] Fedora Reporter: Marius Vollmer <mvollmer>
Component: NetworkManagerAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: blueowl, dcbw, fgiudici, lkundrak, mvollmer, stefw, thaller
Target Milestone: ---   
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: 2017-08-08 17:20:25 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:
Attachments:
Description Flags
[PATCH] manager: fix finding master device when activating slave none

Description Marius Vollmer 2016-09-13 19:29:41 UTC
Description of problem:

If one has a team connection with a slave, but the "team" plugin is not installed, the team connection can't be activated and one gets a clear error message:

   # nmcli con up team0
   Error: Connection activation failed: NetworkManager plugin for 'team' unavailable

If one tries to activate the slave instead, the error message is unhelpful:

   # nmcli con up d7199035-4c3d-36d4-aa4b-ad613d76f0f7
   Error: Connection activation failed: Master connection 'Wired connection 2' can't be activated: No device available

This looks like "Wired connection 2" is a master connection, while it actually is a slave connection.  Also, there is no hint about the real problem.

I would prefer something like

   Error: Connection activation failed: Master connection of 'Wired connection 2' can't be activated: NetworkManager plugin for 'team' unavailable


Version-Release number of selected component (if applicable):
NetworkManager-1.2.4-2.fc24.x86_64

How reproducible:
Always

Steps to Reproduce:
(please ask if you need detailed steps.)

Additional info:

This happens with Cockpit, which unfortunately sometimes activates the slaves when creating a new team.

We activate the slaves because that's the only way to get NetworkManager to fill in some clerical details of a new connection (via AddAndActivate).  It would be nice to have a function that adds a connection for a specific device and fills in the missing details without also activating it.

Comment 1 Marius Vollmer 2016-09-13 20:41:55 UTC
(In reply to Marius Vollmer from comment #0)
 
> We activate the slaves because that's the only way to get NetworkManager to
> fill in some clerical details of a new connection (via AddAndActivate).

This is true, but Cockpit also activates any interface again that was already active before, in order to apply the new settings.  This is much more likely.

This isn't really relevant here, other than to say that getting rid of the use of AddAndActivate is not an alternative to improving the error message, from our point of view.

Comment 2 Stef Walter 2016-09-14 06:07:05 UTC
Marius, can we detect whether the team plugin is not installed?

Comment 3 Blueowl 2016-09-14 09:17:21 UTC
Created attachment 1200760 [details]
[PATCH] manager: fix finding master device when activating slave

Correcting error messages for mater devices.

Comment 4 Thomas Haller 2016-09-14 09:39:30 UTC
(In reply to Blueowl from comment #3)
> Created attachment 1200760 [details]
> [PATCH] manager: fix finding master device when activating slave


»···»···/* Look for an existing device with the master_connection's interface name */
»···»···iface = nm_manager_get_connection_iface (self, NM_CONNECTION (master_connection), NULL, error);
»···»···if (!iface)
»···»···»···return NULL;


this requires now, that nm_manager_get_connection_iface(master_connection) can resolve an @iface. I think that is not always required.  You can have a master-connection where you don't fill in connection.interface-name, can't you? And then early check would shortcut the activation below.

Comment 5 Thomas Haller 2017-04-24 12:46:35 UTC
Needs more work. Back to NEW.

Comment 6 Fedora End Of Life 2017-07-25 23:01:17 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Stef Walter 2017-07-26 05:11:00 UTC
Marius is this still a problem with Fedora 26?

Comment 8 Fedora End Of Life 2017-08-08 17:20:25 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Marius Vollmer 2017-08-18 11:43:19 UTC
(In reply to Stef Walter from comment #7)
> Marius is this still a problem with Fedora 26?

Cockpit should now detect whether teams will work or not, and disable the corresponding UI accordingly.

So, I don't know whether the reported bug is fixed, but it shouldn't affect Cockpit anymore in any case.