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 1810339 - Don't show unavailable bond options for the current mode
Summary: Don't show unavailable bond options for the current 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
low
low
Target Milestone: rc
: 8.2
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-05 02:14 UTC by Mingyu Shi
Modified: 2020-11-04 03:09 UTC (History)
5 users (show)

Fixed In Version: nmstate-0.3.2-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 03:08:25 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate issues 946 0 None closed tracking issue for bond options 2020-08-24 08:16:59 UTC
Red Hat Product Errata RHBA-2020:4696 0 None None None 2020-11-04 03:08:42 UTC

Description Mingyu Shi 2020-03-05 02:14:51 UTC
Description of problem:
Now nmstate only prints the options that diff with default value of libnm. But in fact some options are only available on the specific modes. Such as 'ad_actor_sys_prio' has a default value of 65535 on libnm, it is only available for mode 802.3ad and set as empty for the other modes. In such a circumstance, it will be printed maybe because of it's empty value diffs with 65535.

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

How reproducible:
100%

Steps to Reproduce:
# cat bond1.yaml
---
interfaces:
- name: bond1
  type: bond
  state: up
  link-aggregation:
    mode: active-backup

1. nmstatectl set bond1.yaml
2. nmstatectl show bond1
3. You can see the following two options are printed, but they are only available on 802.3ad mode.
ad_actor_sys_prio: ''
ad_user_port_key: ''

Actual results:
ad_actor_sys_prio and ad_user_port_key reported.

Expected results:
Don't report any unavailable options

Additional info:

Comment 1 Gris Ge 2020-03-13 13:04:11 UTC
This is decorative and NetworkManager intend to change a lot on this bond options handling in RHEL 8.3.

Moving bug to RHEL 8.3.

Comment 4 Mingyu Shi 2020-06-23 10:56:17 UTC
verion:
nmstate-0.3.2-1.el8.noarch
NetworkManager-1.26.0-0.1.el8.x86_64
DISTRO=RHEL-8.3.0-20200616.0
Linux hp-dl388g8-08.rhts.eng.pek2.redhat.com 4.18.0-214.el8.x86_64 #1 SMP Fri Jun 12 08:55:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


#do the following:
rmiface ()
{ 
    echo interfaces: > /tmp/rmiface_temp.yaml;
    for ifname in "$@";
    do
        if echo $ifname | grep --color=auto %; then
            ifilter=`echo $ifname | sed 's/%/.*/g'`;
            iflist=`nmstatectl show | grep "^- name: $ifilter" | awk '{print $3}'`;
            for iface in $iflist;
            do
                echo -e "- name: $iface\n  state: absent" >> /tmp/rmiface_temp.yaml;
            done;
        else
            echo -e "- name: $ifname\n  state: absent" >> /tmp/rmiface_temp.yaml;
        fi;
    done;
    nmstatectl set /tmp/rmiface_temp.yaml
}

for mode in balance-tlb balance-alb balance-rr active-backup balance-xor broadcast 802.3ad; do
    echo =============================================== $mode ==================================================
    cat << EOF > $mode.yaml
interfaces:
- name: bond0
  type: bond
  state: up
  link-aggregation:
    mode: $mode
    slaves:
    - veth1
    - veth0
EOF
    nmstatectl set $mode.yaml
    nmstatectl show bond0 > state-$mode.yaml
    rmiface bond0
done

# when done, check state-*.yaml, for all the modes, there is only one option 'miimon', and if you change the mode of an existing bond without explicitly set values, it will set all the options to default

Comment 7 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.