Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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:
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
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
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: