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 1812737 - Support automatically dealing with unavailable options when changing bond mode
Summary: Support automatically dealing with unavailable options when changing bond mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.3
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks: 1819737 1819738
TreeView+ depends on / blocked
 
Reported: 2020-03-12 02:12 UTC by Mingyu Shi
Modified: 2020-11-04 03:10 UTC (History)
8 users (show)

Fixed In Version: nmstate-0.3.2-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1819737 1819738 (view as bug list)
Environment:
Last Closed: 2020-11-04 03:08:25 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
mode 4 to 1 (8.58 KB, text/plain)
2020-03-12 02:12 UTC, Mingyu Shi
no flags Details
verified.log (8.15 KB, text/plain)
2020-07-10 07:22 UTC, Mingyu Shi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate issues 946 0 None closed tracking issue for bond options 2020-11-19 20:06:19 UTC
Github nmstate nmstate pull 999 0 None closed bond: Don't merge bond options when bond mode changed 2020-11-19 20:06:42 UTC
Red Hat Product Errata RHBA-2020:4696 0 None None None 2020-11-04 03:08:42 UTC

Description Mingyu Shi 2020-03-12 02:12:20 UTC
Created attachment 1669515 [details]
mode 4 to 1

Description of problem:
When change bond from mode A to mode B, if some configured options for mode A are not available for mode B, it may cause an error.
This is inconvenient for user, as user has to deal with these options manually.
For the term 'unavailable', there may be 2 situations:
1. MUST NOT be set;
2. Can be set but no effect.

Version-Release number of selected component (if applicable):
nmstate-0.2.6-3.8.el8.noarch
NetworkManager-1.22.8-4.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
See the attachment as an example (mode 4 to mode 1)
2020-03-12 09:46:06,708 root         ERROR    NM main-loop aborted: Connection update failed: error=nm-connection-error-quark: bond.options: 'lacp_rate' option is only valid with mode '802.3ad' (7), dev=bond-mode4/<enum NM_DEVICE_STATE_ACTIVATED of type NM.DeviceState

Comment 1 Mingyu Shi 2020-03-12 06:04:44 UTC
Part of option limitation and dependency in nmcli:
1. Some will be reported, like lacp_rate
2. Some won't be reported, but removed from connection config, like the items marked 'lost'
3. It seems that the limitation in NM are not totally follows the kernel bond limitation. Such as 'primary' is described 'valid for mode 1,5,6, but in nmcli it reports as only valid with mode 1

[11:54:36@hpe-dl380pgen8-02-vm-7 ~]0# for i in `seq 0 6`
> do echo $i ================================================================================
>     for op in `cat options `
>     do
>          nmcli con modify bond0 bond.options $op,mode=$i && { nmcli con show bond0 | grep $op > /dev/null || echo $op lost; }
>     done
> done

0 ================================================================================
active_slave=veth0 lost
ad_actor_sys_prio=1 lost
ad_actor_system=d4:ee:07:25:42:5a lost
ad_user_port_key=1000 lost
Error: Failed to modify connection 'bond0': bond.options: 'arp_interval' option requires 'arp_ip_target' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'arp_ip_target' option requires 'arp_interval' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'downdelay' option requires 'miimon' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'lacp_rate' option is only valid with mode '802.3ad'
num_unsol_na=2 lost
Error: Failed to modify connection 'bond0': bond.options: 'primary' option is only valid for 'mode=active-backup'
tlb_dynamic_lb=0 lost
Error: Failed to modify connection 'bond0': bond.options: 'updelay' option requires 'miimon' option to be set
1 ================================================================================
ad_actor_sys_prio=1 lost
ad_actor_system=d4:ee:07:25:42:5a lost
ad_user_port_key=1000 lost
Error: Failed to modify connection 'bond0': bond.options: 'arp_interval' option requires 'arp_ip_target' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'arp_ip_target' option requires 'arp_interval' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'downdelay' option requires 'miimon' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'lacp_rate' option is only valid with mode '802.3ad'
num_unsol_na=2 lost
packets_per_slave=2 lost
tlb_dynamic_lb=0 lost
Error: Failed to modify connection 'bond0': bond.options: 'updelay' option requires 'miimon' option to be set
2 ================================================================================
active_slave=veth0 lost
ad_actor_sys_prio=1 lost
ad_actor_system=d4:ee:07:25:42:5a lost
ad_user_port_key=1000 lost
Error: Failed to modify connection 'bond0': bond.options: 'arp_interval' option requires 'arp_ip_target' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'arp_ip_target' option requires 'arp_interval' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'downdelay' option requires 'miimon' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'lacp_rate' option is only valid with mode '802.3ad'
num_unsol_na=2 lost
packets_per_slave=2 lost
Error: Failed to modify connection 'bond0': bond.options: 'primary' option is only valid for 'mode=active-backup'
tlb_dynamic_lb=0 lost
Error: Failed to modify connection 'bond0': bond.options: 'updelay' option requires 'miimon' option to be set
3 ================================================================================
active_slave=veth0 lost
ad_actor_sys_prio=1 lost
ad_actor_system=d4:ee:07:25:42:5a lost
ad_user_port_key=1000 lost
Error: Failed to modify connection 'bond0': bond.options: 'arp_interval' option requires 'arp_ip_target' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'arp_ip_target' option requires 'arp_interval' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'downdelay' option requires 'miimon' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'lacp_rate' option is only valid with mode '802.3ad'
num_unsol_na=2 lost
packets_per_slave=2 lost
Error: Failed to modify connection 'bond0': bond.options: 'primary' option is only valid for 'mode=active-backup'
tlb_dynamic_lb=0 lost
Error: Failed to modify connection 'bond0': bond.options: 'updelay' option requires 'miimon' option to be set
4 ================================================================================
active_slave=veth0 lost
Error: Failed to modify connection 'bond0': bond.options: 'arp_interval' option requires 'arp_ip_target' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'arp_ip_target' option requires 'arp_interval' option to be set
arp_validate=active lost
Error: Failed to modify connection 'bond0': bond.options: 'downdelay' option requires 'miimon' option to be set
num_unsol_na=2 lost
packets_per_slave=2 lost
Error: Failed to modify connection 'bond0': bond.options: 'primary' option is only valid for 'mode=active-backup'
tlb_dynamic_lb=0 lost
Error: Failed to modify connection 'bond0': bond.options: 'updelay' option requires 'miimon' option to be set
5 ================================================================================
ad_actor_sys_prio=1 lost
ad_actor_system=d4:ee:07:25:42:5a lost
ad_user_port_key=1000 lost
Error: Failed to modify connection 'bond0': bond.options: 'mode=balance-tlb' is incompatible with 'arp_interval > 0'
Error: Failed to modify connection 'bond0': bond.options: 'arp_ip_target' option requires 'arp_interval' option to be set
arp_validate=active lost
Error: Failed to modify connection 'bond0': bond.options: 'downdelay' option requires 'miimon' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'lacp_rate' option is only valid with mode '802.3ad'
num_unsol_na=2 lost
packets_per_slave=2 lost
Error: Failed to modify connection 'bond0': bond.options: 'primary' option is only valid for 'mode=active-backup'
Error: Failed to modify connection 'bond0': bond.options: 'updelay' option requires 'miimon' option to be set
6 ================================================================================
ad_actor_sys_prio=1 lost
ad_actor_system=d4:ee:07:25:42:5a lost
ad_user_port_key=1000 lost
Error: Failed to modify connection 'bond0': bond.options: 'mode=balance-alb' is incompatible with 'arp_interval > 0'
Error: Failed to modify connection 'bond0': bond.options: 'arp_ip_target' option requires 'arp_interval' option to be set
arp_validate=active lost
Error: Failed to modify connection 'bond0': bond.options: 'downdelay' option requires 'miimon' option to be set
Error: Failed to modify connection 'bond0': bond.options: 'lacp_rate' option is only valid with mode '802.3ad'
num_unsol_na=2 lost
packets_per_slave=2 lost
Error: Failed to modify connection 'bond0': bond.options: 'primary' option is only valid for 'mode=active-backup'
tlb_dynamic_lb=0 lost
Error: Failed to modify connection 'bond0': bond.options: 'updelay' option requires 'miimon' option to be set

Comment 2 Till Maas 2020-03-12 13:16:44 UTC
Michael, Dominik, can you please take a look at this and evaluate how critical this is for RHV?

Comment 3 Michael Burman 2020-03-12 13:33:34 UTC
(In reply to Till Maas from comment #2)
> Michael, Dominik, can you please take a look at this and evaluate how
> critical this is for RHV?

It will be hard to run into to this using RHV UI when using the default bond modes, without specifying custom bond options.
So i guess important for users that use custom bond modes, not sure if critical.
Dominik?

Comment 4 Dominik Holler 2020-03-12 13:37:15 UTC
(In reply to Michael Burman from comment #3)
> (In reply to Till Maas from comment #2)
> > Michael, Dominik, can you please take a look at this and evaluate how
> > critical this is for RHV?
> 
> It will be hard to run into to this using RHV UI when using the default bond
> modes, without specifying custom bond options.
> So i guess important for users that use custom bond modes, not sure if
> critical.
> Dominik?

Ack, without custom bond modes, RHV uses only mode, xmit_hash_policy and miimon, which should not hurt.
But it would be good if this could fixed on the long run.

Comment 18 Mingyu Shi 2020-07-10 07:22:44 UTC
Created attachment 1700551 [details]
verified.log

Verified with versions:
nmstate-0.3.3-2.el8.noarch
NetworkManager-1.26.0-0.2.1.el8.x86_64
DISTRO=RHEL-8.3.0-20200709.n.0
Linux hpe-dl380pgen8-02-vm-11.hpe2.lab.eng.bos.redhat.com 4.18.0-223.el8.x86_64 #1 SMP Tue Jul 7 12:56:57 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

When changing mode, all the in-disk configs will be removed (unless they are explicitly configured), and set all to default(default of libnm, means only miimon=100 will be shown)

Comment 21 errata-xmlrpc 2020-11-04 03:08:25 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 (nmstate 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/RHBA-2020:4696


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