Skip to content

Commit 2481e27

Browse files
grzegorzkoperbbezak
authored andcommitted
Fix incorrect command when unplugging bond subports
When unplugging a bond from a network with trunk subports, the code was incorrectly using ADD_NETWORK_TO_BOND_TRUNK instead of DELETE_NETWORK_ON_BOND_TRUNK for removing subports from the bond trunk. This caused subports to be added instead of removed during bond cleanup. Fixes the logic to use the correct command for removing subports from bond trunks during network unplug operations. Closes-Bug: #2122025 Change-Id: Ieb01a5b8910b7d3e24ccf2561524f36bbd24b2c5 Signed-off-by: Grzegorz Koper <grzegorzk@stackhpc.com> (cherry picked from commit 26160cd)
1 parent 564b0a4 commit 2481e27

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

networking_generic_switch/devices/netmiko_devices/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def unplug_bond_from_network(self, bond, segmentation_id,
460460
segmentation_id=segmentation_id)
461461
for sub_port in trunk_details.get('sub_ports', []):
462462
cmds += self._format_commands(
463-
self.ADD_NETWORK_TO_BOND_TRUNK, bond=bond,
463+
self.DELETE_NETWORK_ON_BOND_TRUNK, bond=bond,
464464
segmentation_id=sub_port['segmentation_id'])
465465

466466
if ngs_port_default_vlan:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
fixes:
3+
- |
4+
Fixed incorrect command when unplugging bond subports.
5+
Previously, when a bond was unplugged from a network with trunk subports,
6+
the system would incorrectly try to add subports instead of removing them.
7+
This bug has been fixed, and the system now uses the correct command to remove subports,
8+
ensuring proper bond cleanup.

0 commit comments

Comments
 (0)