RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1876577 - Modifying bond active slave fails over "failed: Can't reapply 'active_slave' bond option"
Summary: Modifying bond active slave fails over "failed: Can't reapply 'active_slave' ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.3
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: 8.0
Assignee: Thomas Haller
QA Contact: Vladimir Benes
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-07 15:02 UTC by msheena
Modified: 2021-05-18 13:30 UTC (History)
11 users (show)

Fixed In Version: NetworkManager-1.28.0-0.1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 13:29:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description msheena 2020-09-07 15:02:06 UTC
Description of problem
======================
Given I have a RHEL 8.3 machine with a bond in mode 1 comprised of 2 slaves: enp2s0f1, enp2s0f2 where enp2s0f2 is the active slave
When I run the command:
nmcli dev mod bond01 +bond.options active_slave=enp2s0f1
Then I get a return-code of 6 and a message:
Error: Reapplying connection to device 'bond01' (/org/freedesktop/NetworkManager/Devices/3) failed: Can't reapply 'active_slave' bond option

Version-Release number of selected component (if applicable)
============================================================
Red Hat Enterprise Linux release 8.3 Beta (Ootpa) (4.18.0-235.el8.x86_64)
NetworkManager-1.26.0-7.el8.x86_64
nmstate-0.3.4-12.el8.noarch

How reproducible
================
100%

Steps to Reproduce
==================
1. Create a bond in mode 1 with two slaves
2. Run the command nmcli dev mod <bond_name> +bond.options active_slave=<non active slave>

Actual results
==============
Active slave substitution fails and the message outputted is:
Error: Reapplying connection to device 'bond01' (/org/freedesktop/NetworkManager/Devices/3) failed: Can't reapply 'active_slave' bond option

Expected results
================
Active slave is changed successfully

Additional info
===============
The command:
ifenslave -c bond01 enp2s0f1
works successfully and changes the active slave.

This is a regression from RHEL 8.2.1 NetworkManager-1.22.8-5.el8_2.x86_64 nmstate-0.2.10-1.el8.noarch

Comment 2 Thomas Haller 2020-09-07 16:06:54 UTC
odd, I would have thought this should be fixed with bug 1847814.

by: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/ac6f21cae442bb35b08337f14a97d6ae3f71b52a

which is also backported to latest rhel-8.3:

Changelog:

  * Tue Aug 11 2020 Antonio Cardace <acardace> - 1:1.26.0-4
  - bond: fix Reapply does not update bond options (rh #1847814)




It's because [1] does not whitelist active_slave as a property that can be changed via reapply.

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/2cb40f6e36ce8db8257b07e15fe1bb9a47ce64f3/src/devices/nm-device-bond.c#L544


Presumably, this was not done to only support reapply of options that can be changed without taking the interface down.
However, "active_slave" does not appear to require the interface to be up -- so this is wrong.


Also, not the discussion at https://bugzilla.redhat.com/show_bug.cgi?id=1856640#c19 about active_slave. I think setting that option doesn't work well anyway, and well deprecate this property. Set instead "primary" option.

Comment 3 Michael Burman 2020-09-09 08:14:33 UTC
(In reply to Thomas Haller from comment #2)
> odd, I would have thought this should be fixed with bug 1847814.
> 
> by:
> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/
> ac6f21cae442bb35b08337f14a97d6ae3f71b52a
> 
> which is also backported to latest rhel-8.3:
> 
> Changelog:
> 
>   * Tue Aug 11 2020 Antonio Cardace <acardace> - 1:1.26.0-4
>   - bond: fix Reapply does not update bond options (rh #1847814)
> 
> 
> 
> 
> It's because [1] does not whitelist active_slave as a property that can be
> changed via reapply.
> 
> [1]
> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/
> 2cb40f6e36ce8db8257b07e15fe1bb9a47ce64f3/src/devices/nm-device-bond.c#L544
> 
> 
> Presumably, this was not done to only support reapply of options that can be
> changed without taking the interface down.
> However, "active_slave" does not appear to require the interface to be up --
> so this is wrong.
> 
> 
> Also, not the discussion at
> https://bugzilla.redhat.com/show_bug.cgi?id=1856640#c19 about active_slave.
> I think setting that option doesn't work well anyway, and well deprecate
> this property. Set instead "primary" option.

Hi Thomas, thanks for the hint.
So far the active_slave worked for just fine, stopped working right after we moved to rhel8.3
I tried the primary option instead and it works as you said.
We will change our test accordingly, thanks. 
btw, if the active_slave gonna be deprecated or doesn't work properly as you say, it should be documented somehow and removed from the +bond.options --help

nmcli dev mod bond0 +bond.options --help
Error: failed to modify bond.options: '--help' not among [mode, miimon, downdelay, updelay, arp_interval, arp_ip_target, arp_validate, primary, primary_reselect, fail_over_mac, use_carrier, ad_select, xmit_hash_policy, resend_igmp, lacp_rate, active_slave, ad_actor_sys_prio, ad_actor_system, ad_user_port_key, all_slaves_active, arp_all_targets, min_links, num_grat_arp, num_unsol_na, packets_per_slave, tlb_dynamic_lb, lp_interval].

Comment 4 Beniamino Galvani 2020-09-09 08:28:15 UTC
I agree that the 'primary' option should be used instead; maybe, for backwards compatibility we should translate 'active_slave' into 'primary' as suggested in bug 1856640. At the same time, we should also emit a warning saying that 'active_slave' is deprecated, and remove it from documentation.

Comment 6 Thomas Haller 2020-09-11 10:03:30 UTC
the workaround is to avoid "active_slave" option. In NetworkManager 1.28+ ([1]) this will become a deprecated alias for "primary".
So, start already using only the "primary" option.

(one problem is, that the primary option only works with "active-backup" mode. That will also be fix with [1]).


[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/75ff7a6daf705957d91054ae435f57b49a2437cc

Comment 10 Vladimir Benes 2020-10-02 14:12:17 UTC
CI tests changed to cover this too:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager-ci/-/merge_requests/645

Comment 13 errata-xmlrpc 2021-05-18 13:29:41 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 (Moderate: NetworkManager and libnma security, bug fix, and enhancement update), 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-2021:1574


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