Skip to content

[bgp] Fix 'test_bgp_update_timer'#2619

Merged
lolyu merged 1 commit intosonic-net:masterfrom
lolyu:fix_bgp_update_timer
Dec 7, 2020
Merged

[bgp] Fix 'test_bgp_update_timer'#2619
lolyu merged 1 commit intosonic-net:masterfrom
lolyu:fix_bgp_update_timer

Conversation

@lolyu
Copy link
Collaborator

@lolyu lolyu commented Dec 3, 2020

Previously, new BGP sessions use virtual interface created from PTF mgmt
interface on the PTF side, and use DUT mgmt interfaeas the nexthop to
route traffic from PTF to DUT loopback interface. This imposes a
prerequisite that the DUT mgmt interface must be in the same subnet as
the PTF mgmt interface. test_bgp_update_timer will fail over those
testbeds that don't satisfy this requirement.

Add a fixture setup_interfaces to setup interfaces to be used for
newly created BGP sessions in test case.
For T0, the DUT side interfaces will always be the vlan interface, the
PTF side interfaces are chosen from those interfaces that connect to
vlan member interfaces. The PTF side interfaces are assigned with the IP
addresses within the vlan subnet.
For T1, the DUT side interfaces will be the virtual interfaces created
from those non-portchannle-member interfaes, the PTF side are their
corresponding PTF intercepting interfaces. And each interface pair is
assigned addresses belong to the same subnet.

Signed-off-by: Longxiang Lyu lolv@microsoft.com

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

Fix test_bgp_update_timer failure in testbeds which DUT mgmt interface IP is in a different subnet to the PTF management IP.

How did you do it?

For T0, for a new BGP session, the DUT side uses the vlan interface, the PTF side uses the interface that is connected to one of the DUT vlan member interface and it is assigned an address within the vlan subnet.
For T1, for a new BGP session, create a virtual interface from a non-portchannel interface and use it over the DUT side, the PTF side uses the corresponding intercepting interface of the non-portchannel interface. This pair will be assigned addresses within the same subnet.

  • t0
admin@str2-7260cx3-acs-9:~$ show ip bgp sum

IPv4 Unicast Summary:
BGP router identifier 10.1.0.32, local AS number 4200065100 vrf-id 0
BGP table version 12801
RIB entries 12805, using 2356120 bytes of memory
Peers 6, using 125520 KiB of memory
Peer groups 4, using 256 bytes of memory


Neighbhor      V          AS    MsgRcvd    MsgSent    TblVer    InQ    OutQ  Up/Down    State/PfxRcd    NeighborName
-----------  ---  ----------  ---------  ---------  --------  -----  ------  ---------  --------------  --------------
10.0.0.33      4  4200064600       3218       6419         0      0       0  00:13:29   6400            ARISTA01T1
10.0.0.35      4  4200064600       3218       3536         0      0       0  00:13:27   6400            ARISTA02T1
10.0.0.37      4  4200064600          0          0         0      0       0  never      Active          ARISTA03T1
10.0.0.39      4  4200064600       3218       3536         0      0       0  00:13:27   6400            ARISTA04T1
192.168.0.2    4       61000          9       3210         0      0       0  00:06:58   0               pseudoswitch0
192.168.0.3    4       61001          9       3210         0      0       0  00:06:37   0               pseudoswitch1
  • t1
admin@str-msn2700-02:~$ show ip bgp sum

IPv4 Unicast Summary:
BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0
BGP table version 12739
RIB entries 12851, using 2364584 bytes of memory
Peers 26, using 543920 KiB of memory
Peer groups 4, using 256 bytes of memory


Neighbhor      V     AS    MsgRcvd    MsgSent    TblVer    InQ    OutQ  Up/Down      State/PfxRcd  NeighborName
-----------  ---  -----  ---------  ---------  --------  -----  ------  ---------  --------------  --------------
10.0.0.1       4  65200       3196         29         0      0       0  00:06:16             6370  ARISTA01T2
10.0.0.3       4  61000          4      12819         0      0       0  00:01:04                0  pseudoswitch0
10.0.0.5       4  65200       3196         29         0      0       0  00:06:17             6370  ARISTA03T2
10.0.0.7       4  61001          3       6410         0      0       0  00:00:32                0  pseudoswitch1
10.0.0.9       4  65200       3196         29         0      0       0  00:06:17             6370  ARISTA05T2
10.0.0.13      4  65200       3196         29         0      0       0  00:06:18             6370  ARISTA07T2
10.0.0.17      4  65200       3196         29         0      0       0  00:06:16             6370  ARISTA09T2
10.0.0.21      4  65200       3196         29         0      0       0  00:06:18             6370  ARISTA11T2
10.0.0.25      4  65200       3196         29         0      0       0  00:06:16             6370  ARISTA13T2
10.0.0.29      4  65200       3196         29         0      0       0  00:06:16             6370  ARISTA15T2
10.0.0.33      4  64001         13       9622         0      0       0  00:06:04               34  ARISTA01T0
10.0.0.35      4  64002         11       9620         0      0       0  00:05:35               33  ARISTA02T0
10.0.0.37      4  64003         12       9620         0      0       0  00:05:35               34  ARISTA03T0
10.0.0.39      4  64004         11       9620         0      0       0  00:05:35               33  ARISTA04T0
10.0.0.41      4  64005         11       9620         0      0       0  00:05:38               33  ARISTA05T0
10.0.0.43      4  64006         12       9622         0      0       0  00:06:11               33  ARISTA06T0
10.0.0.45      4  64007         11       9620         0      0       0  00:05:29               33  ARISTA07T0
10.0.0.47      4  64008         12       9622         0      0       0  00:06:11               33  ARISTA08T0
10.0.0.49      4  64009         11       9620         0      0       0  00:05:36               33  ARISTA09T0
10.0.0.51      4  64010         11       9620         0      0       0  00:05:27               33  ARISTA10T0
10.0.0.53      4  64011         11       9620         0      0       0  00:05:31               33  ARISTA11T0
10.0.0.55      4  64012         11       9621         0      0       0  00:05:42               33  ARISTA12T0
10.0.0.57      4  64013         12       9622         0      0       0  00:06:02               33  ARISTA13T0
10.0.0.59      4  64014         12       9622         0      0       0  00:06:07               33  ARISTA14T0
10.0.0.61      4  64015         12       9622         0      0       0  00:06:02               33  ARISTA15T0
10.0.0.63      4  64016         12       9622         0      0       0  00:06:09               33  ARISTA16T0

How did you verify/test it?

Test over testbed that DUT mgmt IP is not within the same subnet as PTF mgmt IP.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@lolyu lolyu force-pushed the fix_bgp_update_timer branch from bbcccdf to e3cbd29 Compare December 3, 2020 13:29
@lolyu lolyu marked this pull request as ready for review December 3, 2020 13:38
@lolyu lolyu requested a review from a team December 3, 2020 13:38
@sonic-net sonic-net deleted a comment from lgtm-com bot Dec 3, 2020
@lolyu lolyu force-pushed the fix_bgp_update_timer branch from e3cbd29 to 57a2670 Compare December 3, 2020 13:46
@lolyu lolyu changed the title Add fixture 'setup_interfaces' [bgp] Fix 'test_bgp_update_timer' Dec 3, 2020
@lolyu lolyu force-pushed the fix_bgp_update_timer branch from 57a2670 to c202c4f Compare December 4, 2020 05:26
Previously, new BGP sessions use virtual interface created from PTF mgmt
interface on the PTF side, and use DUT mgmt interfaeas the nexthop to
route traffic from PTF to DUT loopback interface. This imposes a
prerequisite that the DUT mgmt interface must be in the same subnet as
the PTF mgmt interface. test_bgp_update_timer will fail over those
testbeds that don't satisfy this requirement.

Add a fixture `setup_interfaces` to setup interfaces to be used for
newly created BGP sessions in test case.
For T0, the DUT side interfaces will always be the vlan interface, the
PTF side interfaces are chosen from those interfaces that connect to
vlan member interfaces. The PTF side interfaces are assigned with the IP
addresses within the vlan subnet.
For T1, the DUT side interfaces will be the virtual interfaces created
from those non-portchannle-member interfaes, the PTF side are their
corresponding PTF intercepting interfaces. And each interface pair is
assigned addresses belong to the same subnet.

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
@lolyu lolyu force-pushed the fix_bgp_update_timer branch from c202c4f to 328327f Compare December 4, 2020 05:43
@lolyu lolyu merged commit 8651eb2 into sonic-net:master Dec 7, 2020
bingwang-ms added a commit to bingwang-ms/sonic-mgmt that referenced this pull request Dec 14, 2020
PR sonic-net#2619 introduced a new fixture to add routes and IP on both DUT and
ptf. This commit updates test_traffic_shift to use this newly added
fixture.

Signed-off-by: bingwang <bingwang@microsoft.com>
bingwang-ms added a commit that referenced this pull request Dec 14, 2020
PR #2619 introduced a new fixture to add routes and IP on both DUT and
ptf. This commit updates test_traffic_shift to use this newly added
fixture.

Signed-off-by: bingwang <bingwang@microsoft.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Why I did it
Submodule advances:
sonic-utilities

8e8e6088 - [202211][dhcp_relay] Remove add field of vlanid to DHCP_RELAY table while adding vlan ([201811 sub-module] advance sub-modules: utilities, swss, swss-common sonic-net#2679) (16 hours ago) [Yaqiang Zhu]
1400fb94 - [GCU] Ignore bgpraw in GCU applier (Fix sfputil indexing for 7170-Q59S20 sonic-net#2623) (15 hours ago) [jingwenxie]
f76a6364 - [vlan] Refresh dhcpv6_relay config while adding/deleting a vlan ([sonic-py-swsssdk] Update submodule sonic-net#2660) (15 hours ago) [Yaqiang Zhu]
7849e18d - [db_migrator] make LOG_LEVEL_DB migration more robust (Mellanox platform: attach queues 2 and 6 to lossy profile using generic buffer template sonic-net#2651) (16 hours ago) [Stepan Blyshchak]
c7df6dfa - Fixed a bug in "show vnet routes all" causing screen overrun. (Add hook to allow customizing link cable lengths sonic-net#2644) (16 hours ago) [siqbal1986]
a5505f02 - show logging CLI support for logs stored in tmpfs (Traceback error seen while issuing show interface commands with if_names sonic-net#2641) (16 hours ago) [mihirpat1]
bbacb91a - [system-health] Fix issue: show system-health CLI crashes (Updating deb package for platform and sai sonic-net#2635) (16 hours ago) [Junchao-Mellanox]
8d724024 - [sai_failure_dump]Invoking dump during SAI failure ([dockers]: Upgrade LLDP docker to stretch build sonic-net#2633) (16 hours ago) [Sudharsan Dhamal Gopalarathnam]
3c3be526 - Add transceiver info CLI support to show output from TRANSCEIVER_INFO for ZR ([submodule]: Update sonic-sairedis pointer sonic-net#2630) (16 hours ago) [mihirpat1]
37f41666 - [show] add support for gRPC show commands for active-active ([bitmap-vnet]: Bitmap vnet test image [DO NOT MERGE] sonic-net#2629) (16 hours ago) [vdahiya12]
b06d7fe4 - [show_bfd] add local discriminator in show bfd command ([Pmon] Selectively load pmon container daemons sonic-net#2625) (16 hours ago) [Baorong Liu]
6adcd3e8 - [GCU] Ignore bgpraw table in GCU operation ([Mellanox] Fix SAI version sonic-net#2628) (16 hours ago) [jingwenxie]
c65bdc35 - [muxcable][config] Add support to enable/disable ceasing to be an advertisement interface when radv service is stopped (Add knob in ConfigDB to enable/disable telemetry container sonic-net#2622) (16 hours ago) [Jing Zhang]
91e9457f - Add Transceiver PM basic CLI support to show output from TRANSCEIVER_PM table for ZR ([201803] Restart SwSS, syncd and dependent services if a critical process in syncd container exits sonic-net#2615) (16 hours ago) [longhuan-cisco]
54cc8c5a - Remove TODO comment which is no longer relevant (Warm-reboot: teamd warm restart caused neighbor deleted and learned again.  sonic-net#2600) (16 hours ago) [Lior Avramov]
6891b4fb - Making 'show feature autorestart' more resilient to missing auto_restart config in CONFIG_DB ([submodule] update mellanox hw-mgmgt pointer (V.2.0.0061) sonic-net#2592) (16 hours ago) [kartik-arista]
1e8bea37 - [storyteller] add link prober state change to story teller ([sonic-buildimage] New feature managementVRF(L3mdev) sonic-net#2585) (16 hours ago) [Jing Zhang]
7481a20f - Extend fast-reboot STATE_DB entry timer ([submodule]: update sonic-swss-common, sonic-py-swsssdk, sonic-snmpagent sonic-net#2577) (16 hours ago) [Aryeh Feigin]
0e08701c - [sonic_installer] use /etc/resolv.conf from the host when migrating packages (Set a rate limit on syslog messages from all Docker containers sonic-net#2573) (16 hours ago) [Stepan Blyshchak]
06096780 - Fixed admin state config CLI for Backport interfaces (Prior to install a new ONIE SONiC image, delete all partitions except EFI/ONIE sonic-net#2557) (16 hours ago) [anamehra]
9f1f13e4 - [show] Add bgpraw to show run all (Fixed typo on paragraph sonic-net#40 sonic-net#2537) (16 hours ago) [jingwenxie]
98bc8bd2 - [chassis][voq] Add "show fabric reachability" command. ([ntp]: Build 4.2.6 locally. sonic-net#2528) (16 hours ago) [jfeng-arista]
3a50b63f - Preserve copp tables through DB migration ([docker-radvd]: upgrade docker radvd to stretch based sonic-net#2524) (16 hours ago) [Aryeh Feigin]
28f6b127 - [masic] 'show interfaces counters' reminds to use '-d all' option to check for internal links (solve dependency issue sonic-net#2466) (16 hours ago) [wenyiz2021]
15026e14 - suppport multi asic for show queue counter ([dockers] Prevent old supervisord messages from gettting re-logged to syslog sonic-net#2439) (16 hours ago) [zhixzhu]
2d773e17 - [masic support] 'show run bgp' support for multi-asic (lo address not synced to the asic sonic-net#2427) (16 hours ago) [wenyiz2021]
sonic-swss

4f304bc - [EVPN]Handling race condition when remote VNI arrives before tunnel map entry ([sonic-quagga] Function defect, do NOT cancel route while connect IP down sonic-net#2642) (15 hours ago) [Sudharsan Dhamal Gopalarathnam]
34fc615 - [sai_failure_dump]Invoking dump during SAI failure (Add hook to allow customizing link cable lengths sonic-net#2644) (15 hours ago) [Sudharsan Dhamal Gopalarathnam]
b817695 - [autoneg]Fixing adv interface types to be set when AN is disabled (Fix issue with platform file path name sonic-net#2638) (15 hours ago) [Sudharsan Dhamal Gopalarathnam]
ab36bd4 - [bfdorch] add local discriminator to state DB ([bitmap-vnet]: Bitmap vnet test image [DO NOT MERGE] sonic-net#2629) (15 hours ago) [Baorong Liu]
6343471 - Remove TODO comments that are no longer relevant (Add knob in ConfigDB to enable/disable telemetry container sonic-net#2622) (15 hours ago) [Lior Avramov]
2b1869c - [refactor]Refactoring sai handle status (Rollback kernel submodule update. sonic-net#2621) (15 hours ago) [Sudharsan Dhamal Gopalarathnam]
c41a1b7 - Fix issue ARP entry is out of sync between kernel and APPL_DB after warm reboot if the ARP entry is updated more than once during warm reboot in PFC watchdog warm reboot test sonic-net#13341 ARP entry can be out of sync between kernel and APPL_DB if multiple updates are received from RTNL ([sub module] advance sonic-utilities sub module for 201811 branch sonic-net#2619) (15 hours ago) [Stephen Sun]
da0cf7a - Changed the BFD default detect multiplier to 10x ("failed to load plugin io.containerd.snapshotter..." seen during linux boot up sonic-net#2614) (15 hours ago) [siqbal1986]
13b5adf - [vstest] Only collect stdout of orchagent_restart_check in vstest ([submodules] update swss and utilities pointers sonic-net#2597) (15 hours ago) [bingwang-ms]
2b9d94d - Avoid aborting orchagent when setting TUNNEL attributes (build failing for PLATFORM=p4 sonic-net#2591) (15 hours ago) [Stephen Sun]
99b7d3b - Only collect stdout of orchagent_restart_check in vstest ( [saibcm-modules]: import new bcm modules sonic-net#2578) (15 hours ago) [bingwang-ms]
5209c42 - dereg acl-rule counters during acl-table del ([201803] Set a rate limit on syslog messages from all Docker containers sonic-net#2574) (15 hours ago) [Vivek]
ae68054 - Fixed set mtu for deleted subintf due to late notification ([vs]: Add option to specify platform name for DVS orchagent sonic-net#2571) (15 hours ago) [EdenGri]
ab13dfa - Remove TODO comments which are no longer needed (support set timezone in ConfigDB sonic-net#2568) (15 hours ago) [Junchao-Mellanox]
a3545cf - Modify coppmgr mergeConfig to support preserving copp tables through reboot. (Added new SN3700/SN3700C Mellanox platforms sonic-net#2548) (15 hours ago) [Aryeh Feigin]
be16e79 - Use github code scanning instead of LGTM ([201803] [services] Restart SwSS service upon unexpected critical process exit sonic-net#2546) (15 hours ago) [Liu Shilong]
63c0234 - Updated handling of VRF_VNI mapping and VLAN_VNI mapping for same VNI ID (Move warm_restart enable/disable config to stateDB WARM_RESTART_ENABL… sonic-net#2538) (15 hours ago) [Tapash Das]
4844111 - Fix potential risks ([mlnx] Fix sai xml path for boxer platform sonic-net#2516) (15 hours ago) [Liran-Ar]
6420808 - [p4orch]: PINS Extension tables support ([build] When generating image version, handle case where current commit has no reachable tags sonic-net#2506) (15 hours ago) [svshah-intel]
sonic-swss-common

1badd46 - Increase the netlink buffer size from 3MB to 16MB. (arp_update doesn't sleep 300 between each execution sonic-net#739) (14 hours ago) [KISHORE KUNAL]
6555057 - Refactor eventpublisher deinit ([acl] Add default deny rule for l3 table sonic-net#734) (14 hours ago) [Zain Budhwani]
f4d6de7 - Use github code scanning instead of LGTM ([sonic-quagga]:update submodule sonic-net#718) (14 hours ago) [Liu Shilong]
sonic-linux-kernel

74f9a8f - Update linux kernel for hw-mgmt V.7.0020.4104 (Move template files to /usr/share/sonic/templates sonic-net#305) (14 hours ago) [Stephen Sun]
6365701 - Fixes for emmc unreliability ([build_debian.sh]: Integrate system dump script sonic-net#270) (14 hours ago) [Samuel Angebault]
How I did it
How to verify it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants