Skip to content

Commit 9e9831c

Browse files
authored
[GCU] Update the testcase to avoid duplicate ip range (sonic-net#16816)
What is the motivation for this PR? Patch Applier: * [{"op": "remove", "path": "/BGP_PEER_RANGE/BGPSLBPassiveV6"}]\n Patch Applier: * [{"op": "add", "path": "/BGP_PEER_RANGE/BGPVac", "value": {"ip_range": ["192.168.0.0/21"], "name": "BGPVac", "src_address": "10.1.0.32"}}]\n Patch Applier: * [{"op": "remove", "path": "/BGP_PEER_RANGE/BGPSLBPassive"}]\n Patch Applier: * [{"op": "add", "path": "/BGP_PEER_RANGE/BGPSLBPassive", "value": {"ip_range": ["10.255.0.0/25"], "name": "BGPSLBPassive", "src_address": "10.1.0.32"}}] The problem comes from that the running config already has 192.168.0.0 in BGPSLBPassive when add ip_range 192.168.0.0 to BGPVac. Then it cause the ip_range duplicate issue. Though the BGPSLBPassive's ip range change also in the patch, it comes after BGPVac which cause issue during the rollback. The fix is to clean up the config before rollback. How did you do it? Remove BGP_PEER_RANGE config before rollback. How did you verify/test it? E2E
1 parent 21e49f9 commit 9e9831c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/generic_config_updater/test_bgp_speaker.py

+1
Original file line numberDiff line numberDiff line change
@@ -261,3 +261,4 @@ def test_bgp_speaker_tc1_test_config(rand_selected_dut, lo_intf_ips, vlan_intf_i
261261
bgp_speaker_tc1_add_dummy_ip_range(rand_selected_dut)
262262
bgp_speaker_tc1_rm_dummy_ip_range(rand_selected_dut)
263263
bgp_speaker_tc1_replace_src_address(rand_selected_dut)
264+
bgp_speaker_config_cleanup(rand_selected_dut)

0 commit comments

Comments
 (0)