Skip to content

[test_route_perf] Fix test_route_perf.#2410

Merged
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:fix_test_route_perf
Oct 28, 2020
Merged

[test_route_perf] Fix test_route_perf.#2410
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:fix_test_route_perf

Conversation

@bingwang-ms
Copy link
Collaborator

Signed-off-by: bingwang [email protected]

Description of PR

Summary:
Fixes #2397
There are several problems in test_route_perf

  1. DUT is not cleanup if error is raised before cleanup;
  2. Error log reported by route_checker may cause test error, but these errors are possible and explainable ;
Oct 27 04:41:11.849379 str-7260cx3-acs-2 ERR route_check.py:  results: { {#012    "Unaccounted_ROUTE_ENTRY_TABLE_entries": [#012        "3000:146c:1::/64", #012        "3000:146d:1::/64", #012        "3000:146e:1::/64", #012        "3000:146f:1::/64", #012        "3000:1470:1::/64", #012        "3000:1471:1::/64", #012        "3000:1565:1::
Oct 27 04:41:11.850044 str-7260cx3-acs-2 ERR route_check.py:  Failed. Look at reported mismatches above
Oct 27 04:42:08.994134 str-7260cx3-acs-2 ERR monit[627]: 'routeCheck' status failed (255) -- results: { {#012    "Unaccounted_ROUTE_ENTRY_TABLE_entries": [#012        "3000:146c:1::/64", #012        "3000:146d:1::/64", #012        "3000:146e:1::/64", #012        "3000:146f:1::/64", #012        "3000:1470:1::/64", #012        "3000:1471:1::/64", #012        "3000:1482:1::/64", #012        "3000:1483:1::/64",
Oct 27 04:47:11.753617 str-7260cx3-acs-2 INFO monit[627]: 'routeCheck' status succeeded (0) -- no output
  1. ip neigh add is not able to add neigh to ARP cache even ip neigh del or ip neigh flush is called.
    This PR address these issues.

Type of change

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

Approach

What is the motivation for this PR?

This PR is to fix #2397.

How did you do it?

  1. Use param to generate tests for ipv4/ipv6
  2. Run cleanup even test failed
  3. Add config reload to do a further cleanup if test failed
  4. Ignore ERROR log reported by route_checker
  5. Use 'ip neigh replace' in place of 'ip neigh add'

How did you verify/test it?

Verified on Arista-7260cx3.

py.test --inventory ../ansible/str,../ansible/veos --host-pattern str-7260cx3-acs-2 --module-path ../ansible --testbed vms7-t0-7260-2 --testbed_file ../ansible/testbed.csv --junit-xml=tr.xml --log-cli-level warn --collect_techsupport=False --topology=t0,any,util route/test_route_perf.py
/usr/local/lib/python2.7/dist-packages/cryptography/__init__.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
  CryptographyDeprecationWarning,
========================================================================================= test session starts =========================================================================================
rootdir: /data/Networking-acs-sonic-mgmt/tests, inifile: pytest.ini
plugins: ansible-2.2.2, forked-1.3.0, xdist-1.28.0, html-1.22.1, repeat-0.8.0, metadata-1.10.0
collected 2 items                                                                                                                                                                                     

route/test_route_perf.py::test_perf_add_remove_routes[4] PASSED                                                                                                                                 [ 50%]
route/test_route_perf.py::test_perf_add_remove_routes[6] PASSED                                                                                                                                 [100%]

------------------------------------------------------------------ generated xml file: /data/Networking-acs-sonic-mgmt/tests/tr.xml -------------------------------------------------------------------
===================================================================================== 2 passed in 194.69 seconds ======================================================================================

The update is also verified on DX010-4, which is running a master branch image. The case will fail because of image issue, bug DUT is cleaned up.

Any platform specific information?

No.

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

No.

Documentation

No.

1. Use param to generate tests for ipv4/ipv6
2. Run cleanup even test failed
3. Add config reload to do a further cleanup if test failed
4. Ignore ERROR log reported by route_checker
5. Use 'ip neigh replace' in place of 'ip neigh add'

Signed-off-by: bingwang <[email protected]>
@bingwang-ms bingwang-ms requested review from a team and shi-su October 27, 2020 05:44
start_num_route = count_routes(duthost)

# Calculate timeout as a function of the number of routes
route_timeout = max(len(prefixes) / 500, 1) # Allow at least 1 second even when there is a limited number of routes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this great work! I did see a device that fails to finish the routes within this time limit and does not have enough resources for an additional 10000 routes. I thought this might not be an image issue. And we probably want to relax the timeout a bit and reduce the default number of routes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also noticed error reported by swssconfig when applying a large config file.

Oct 26 05:40:54.180200 str-dx010-acs-4 NOTICE swss#swssconfig: :- main: Loading config from JSON file:/arp_test.json...
Oct 26 05:41:00.540328 str-dx010-acs-4 ERR swss#swssconfig: :- main: Exception caught: Unable to connect to redis: Cannot assign requested address

Someone has reported the issue here sonic-net/sonic-buildimage#3849 .

@bingwang-ms bingwang-ms merged commit b4adc63 into sonic-net:master Oct 28, 2020
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…submodule head (sonic-net#11705)

Kernel:
* 86c4b66 2022-07-28 | [Mellanox] Add new kernel patches from HW-MGMT package V.7.0020.3005 (sonic-net#287) (HEAD -> 202205) [Kebo Liu]
* 3a8416a 2022-07-05 | [patch] mlxsw: i2c: Prevent transaction execution for special chip (sonic-net#279) [Stepan Blyshchak]

swss:
* 3f69944 2022-08-10 | Set internal class state to reflect the actual state (sonic-net#2410) (HEAD -> 202205, tag: foo) [Prince Sunny]
* 87e98eb 2022-08-09 | [portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (sonic-net#2400) [Stephen Sun]
* e71ab99 2022-07-29 | portsorch: initial support for link-training (sonic-net#2359) [Dante (Kuo-Jung) Su]
* ed5e5be 2022-07-08 | Port configuration incremental update support (sonic-net#2305) [Junchao-Mellanox]

utilities:
* 0df3ba8 2022-08-12 | Revert "Improve the way to check port type of RJ45 port (sonic-net#2249)" (HEAD -> 202205) [Ying Xie]
* 9b21903 2022-08-12 | Fix test failure in dump table test in 202205 (sonic-net#2307) (HEAD -> 202205, github/202205) [Stephen Sun]
* 750d1db 2022-08-11 | Convert IPv6 addresses to lowercase in apply-patch (sonic-net#2299) (HEAD -> 202205) [dbarashinvd]
* 555947e 2022-08-09 | [config][muxcable] add support to enable/disable ycable telemetry (sonic-net#2297) [vdahiya12]
* 978f416 2022-08-09 | Fix GCU bug when backend service modifying config (sonic-net#2295) [jingwenxie]
* 8fed381 2022-08-02 | [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB (sonic-net#2223) (github/202205) [Stephen Sun]
* a1a09e4 2022-07-29 | Improve the way to check port type of RJ45 port (sonic-net#2249) [Stephen Sun]
* 9bdbfb8 2022-05-19 | sonic-utils: initial support for link-training (sonic-net#2071) [Dante (Kuo-Jung) Su]
* c088ec4 2022-08-10 | Support to enable fips for the command sonic_installer (sonic-net#2154) (sonic-net#2303) [xumia]

platform-daemon:
* 767cfb6 2022-08-09 | [ycabled] add capability to enable/disable telemetry (sonic-net#279) (HEAD -> 202205) [vdahiya12]

linkmgrd:
* cf1ba2b 2022-08-12 | wait for handler to be completed (sonic-net#114) (HEAD -> 202205, github/202205) [Jing Zhang]
* e99026c 2022-08-11 | [lgtm]: add uuid-dev to lgtm prepare (sonic-net#112) (HEAD -> 202205) [Jing Zhang]
* bd1b7f0 2022-08-11 | Adjust `DbInterfaceRaceConditionCheck` to Wait Longer for Handlers to be executed (sonic-net#111) (HEAD -> 202205, github/202205) [Jing Zhang]
* e9dc6b2 2022-08-11 | Backoff mux probing for server down scenario (sonic-net#106) [Jing Zhang]
* 0d61171 2022-08-09 | Fix race condition caused by strand `wrap` method (sonic-net#104) [Jing Zhang]
* e9ede7d 2022-07-02 | Enforce switch after config mux to active (sonic-net#95) [Longxiang Lyu]
* 15dbc30 2022-06-30 | Add unittest to verify mux toggle active (sonic-net#94) [Longxiang Lyu]

Signed-off-by: Ying Xie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[test_route_perf] test_perf_add_remove_routes left ip address on some interfaces

2 participants