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 2186008 - sysfs interface to remove a bonding slave does not work
Summary: sysfs interface to remove a bonding slave does not work
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: kernel
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Hangbin Liu
QA Contact: Network QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-11 20:01 UTC by Andrew Schorr
Modified: 2023-05-25 10:07 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-25 10:07:39 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-154437 0 None None None 2023-04-11 20:02:27 UTC

Description Andrew Schorr 2023-04-11 20:01:39 UTC
Description of problem:
Removing a bonding slave via the sysfs interface does not work

Version-Release number of selected component (if applicable):
kernel-5.14.0-295.el9.x86_64

How reproducible:
always

Steps to Reproduce:
1. create an active-backup bonding interface with slaves lan2 and lan0
2. add new interface lan3
3. try to remove lan2 with echo -lan2 > /sys/class/net/bond0/bonding/slaves

Actual results:
sh-5.1# cat /sys/class/net/bond0/bonding/slaves
lan0 lan3 lan2
sh-5.1# echo -lan2 > /sys/class/net/bond0/bonding/slaves
sh-5.1# cat /sys/class/net/bond0/bonding/slaves
lan0 lan3 lan2


Expected results:
The lan2 interface should be removed from the bonding interface.

Additional info:

Comment 1 Hangbin Liu 2023-05-18 04:04:16 UTC
(In reply to Andrew Schorr from comment #0)
> Actual results:
> sh-5.1# cat /sys/class/net/bond0/bonding/slaves
> lan0 lan3 lan2
> sh-5.1# echo -lan2 > /sys/class/net/bond0/bonding/slaves
> sh-5.1# cat /sys/class/net/bond0/bonding/slaves
> lan0 lan3 lan2
> 
> 
> Expected results:
> The lan2 interface should be removed from the bonding interface.

Hi Andrew,

I can't reproduce this issue with veth or virtio driver. Which NIC driver are you using?

Thanks
Hangbin

Comment 2 Andrew Schorr 2023-05-18 12:24:43 UTC
Hi Hangbin,

According to my records, lan0 was igb, and lan2 and lan3 were i40e.

Regards,
Andy

Comment 3 Hangbin Liu 2023-05-24 13:57:03 UTC
Hi Andrew,

I am still unable to reproduce. Are you able to reproduce the issue stably?

# uname -r
5.14.0-295.el9.x86_64
# ethtool -i enp4s0f0 | grep driver
driver: i40e
# echo +eno1 > /sys/class/net/bond0/bonding/slaves
# cat /sys/class/net/bond0/bonding/slaves
eno1
# echo +enp4s0f0 > /sys/class/net/bond0/bonding/slaves
# cat /sys/class/net/bond0/bonding/slaves
eno1 enp4s0f0
# echo +enp4s0f1 > /sys/class/net/bond0/bonding/slaves
# cat /sys/class/net/bond0/bonding/slaves
eno1 enp4s0f0 enp4s0f1
# echo -enp4s0f0 > /sys/class/net/bond0/bonding/slaves
# cat /sys/class/net/bond0/bonding/slaves
eno1 enp4s0f1

Comment 4 Andrew Schorr 2023-05-24 20:12:54 UTC
Hi Hangbin,

I don't think I'm going to have a chance to duplicate this setup. At the time, I was
working with a defective multi-port i40e card (I did not realize it was defective
at that time). I was trying to switch the active port on the i40e card to see if
a different port worked better, when I encountered this problem. It was stable
at that time. Could the fact that the i40e card had a hardware problem affect
the way the kernel was behaving? I doubt that I will get the chance to play around
with this again. I have too many other urgent issues to deal with right now.

Regards,
Andy

Comment 5 LiLiang 2023-05-25 09:39:41 UTC
I had a try on 5.14.0-309.el9.x86_64, didn't recreate this bug.

[root@dell-per750-57 ~]# modprobe -v bonding
insmod /lib/modules/5.14.0-309.el9.x86_64/kernel/drivers/net/bonding/bonding.ko.xz max_bonds=0 

[root@dell-per750-57 ~]# echo +bond0 > /sys/class/net/bonding_masters 
[root@dell-per750-57 ~]# echo 1 > /sys/class/net/bond0/bonding/mode 
[root@dell-per750-57 ~]# echo 100 > /sys/class/net/bond0/bonding/miimon
[root@dell-per750-57 ~]# ip link set bond0 up

[root@dell-per750-57 ~]# ip link set ens7f0 down
[root@dell-per750-57 ~]# echo +ens7f0 > /sys/class/net/bond0/bonding/slaves 
[root@dell-per750-57 ~]# ip link set ens7f1 down
[root@dell-per750-57 ~]# echo +ens7f1 > /sys/class/net/bond0/bonding/slaves 
[root@dell-per750-57 ~]# ip link set enp177s0np0 down
[root@dell-per750-57 ~]# echo +enp177s0np0 > /sys/class/net/bond0/bonding/slaves 
[root@dell-per750-57 ~]# cat /sys/class/net/bond0/bonding/slaves 
ens7f0 ens7f1 enp177s0np0

[root@dell-per750-57 ~]# echo -ens7f0 > /sys/class/net/bond0/bonding/slaves 
[root@dell-per750-57 ~]# cat /sys/class/net/bond0/bonding/slaves 
ens7f1 enp177s0np0

[root@dell-per750-57 ~]# uname -r
5.14.0-309.el9.x86_64

Comment 6 LiLiang 2023-05-25 09:40:22 UTC
[root@dell-per750-57 ~]# ethtool -i ens7f0
driver: i40e
version: 5.14.0-309.el9.x86_64
firmware-version: 7.00 0x80004c97 1.2154.0
expansion-rom-version: 
bus-info: 0000:ca:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
[root@dell-per750-57 ~]# ethtool -i ens7f1
driver: i40e
version: 5.14.0-309.el9.x86_64
firmware-version: 7.00 0x80004c97 1.2154.0
expansion-rom-version: 
bus-info: 0000:ca:00.1
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
[root@dell-per750-57 ~]# ethtool -i enp177s0np0
driver: nfp
version: 5.14.0-309.el9.x86_64
firmware-version: 0.0.3.5 0.22 nic-2.1.16.1 nic
expansion-rom-version: 
bus-info: 0000:b1:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no

Comment 7 Hangbin Liu 2023-05-25 10:07:39 UTC
Thanks Liang for the conformation. I will close this bug first until we can reproduce it again.


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