[action] [PR:3763] Fix vnet_route_check for active and inactive routes, add --all option#3780
Merged
mssonicbld merged 1 commit intosonic-net:202411from Feb 25, 2025
Merged
Conversation
…tion
<!--
Please make sure you've read and understood our contributing guidelines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md
** Make sure all your commits include a signature generated with `git commit -s` **
If this is a bug fix, make sure your description includes "closes #xxxx",
"fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
issue when the PR is merged.
If you are adding/modifying/removing any command or utility script, please also
make sure to add/modify/remove any unit tests from the tests
directory as appropriate.
If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
subcommand, or you are adding a new subcommand, please make sure you also
update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
your changes.
Please provide the following information:
-->
#### What I did
Added the options `-a` and `--all` to `scripts/vnet_route_check.py`. Both options are equivalent. If none of them is provided, then when finding the VNET routes that are in APP DB but not in ASIC DB, we will ignore routes in APP DB that are not active.
Mock tests in `tests/test_vnet_route_check.py` are added to test this behavior.
#### How I did it
If `-a` and `--all` are not provided, we first filter routes in APP DB to find active routes and then check which active routes are not in ASIC DB. The status of each route is retrieved from STATE DB. If a route is not found in STATE DB, then it is considered to be active.
#### How to verify it
You can verify the behavior by running mock tests in `tests/test_vnet_route_check.py`, or by manually running the `vnet_route_check.py` script on a DUT.
#### Previous command output (if the output of a command-line utility has changed)
N/A
#### New command output (if the output of a command-line utility has changed)
N/A
Collaborator
Author
|
Original PR: #3763 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#133) ```<br>* d3c0f199 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-26) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#134) ```<br>* 4ed8d537 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-27) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#135) ```<br>* b7fbd2f9 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-28) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#136) ```<br>* 18421ce7 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-28) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#137) ```<br>* e7e4b43e - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-02-28) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#138) ```<br>* 56575f75 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-01) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#139) ```<br>* 52ecaa98 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-02) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#140) ```<br>* 3aca3f41 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-03) [Sonic Automation] * 17a7b18 - (origin/202411) Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#141) ```<br>* 9cd1472c - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-04) [Sonic Automation] * c01a4f5 - (origin/202411) Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 20, 2025
sonic-net#142) ```<br>* 042c5555 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-05) [Sonic Automation] * c01a4f5 - (origin/202411) Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#143) ```<br>* c3f000e1 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-06) [Sonic Automation] * 7f316e7 - (origin/202411) revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#144) ```<br>* 9e5d5844 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-07) [Sonic Automation] * 7f316e7 - (origin/202411) revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#146) ```<br>* 11ad3ff8 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-08) [Sonic Automation] * 357f95d - (origin/202411) enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#147) ```<br>* f8a5fd39 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-09) [Sonic Automation] * 357f95d - (origin/202411) enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#148) ```<br>* 39c170e9 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-10) [Sonic Automation] * 357f95d - (origin/202411) enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#149) ```<br>* 8af724a1 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-11) [Sonic Automation] * 7a3f4ad - (origin/202411) Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#150) ```<br>* fb5b4862 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-12) [Sonic Automation] * 7a3f4ad - (origin/202411) Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#151) ```<br>* 93d21bc1 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-13) [Sonic Automation] * 04bc01d - (origin/202411) [Techsupport]Add show route-map command to frr dumps in techsupport (sonic-net#3803) (2025-03-13) [mssonicbld] * 7a3f4ad - Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#152) ```<br>* e45cc495 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-14) [Sonic Automation] * b197a61 - (origin/202411) [db_migrator] Migrate tunnel table (sonic-net#3806) (2025-03-14) [mssonicbld] * 5b765f3 - [GCU] Add data acl table and rule check (sonic-net#3807) (2025-03-14) [mssonicbld] * 04bc01d - [Techsupport]Add show route-map command to frr dumps in techsupport (sonic-net#3803) (2025-03-13) [mssonicbld] * 7a3f4ad - Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#154) ```<br>* 94af3eab - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-15) [Sonic Automation] * b197a61 - (origin/202411) [db_migrator] Migrate tunnel table (sonic-net#3806) (2025-03-14) [mssonicbld] * 5b765f3 - [GCU] Add data acl table and rule check (sonic-net#3807) (2025-03-14) [mssonicbld] * 04bc01d - [Techsupport]Add show route-map command to frr dumps in techsupport (sonic-net#3803) (2025-03-13) [mssonicbld] * 7a3f4ad - Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
sonic-net#155) ```<br>* 4e7f14b1 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-16) [Sonic Automation] * b197a61 - (origin/202411) [db_migrator] Migrate tunnel table (sonic-net#3806) (2025-03-14) [mssonicbld] * 5b765f3 - [GCU] Add data acl table and rule check (sonic-net#3807) (2025-03-14) [mssonicbld] * 04bc01d - [Techsupport]Add show route-map command to frr dumps in techsupport (sonic-net#3803) (2025-03-13) [mssonicbld] * 7a3f4ad - Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-utilities
that referenced
this pull request
Mar 31, 2025
```<br>* dcf6214 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-utilities into 202412 (2025-03-17) [Sonic Automation] * b197a61 - (origin/202411) [db_migrator] Migrate tunnel table (sonic-net#3806) (2025-03-14) [mssonicbld] * 5b765f3 - [GCU] Add data acl table and rule check (sonic-net#3807) (2025-03-14) [mssonicbld] * 04bc01d - [Techsupport]Add show route-map command to frr dumps in techsupport (sonic-net#3803) (2025-03-13) [mssonicbld] * 7a3f4ad - Fix the interface name length validation for subinterface (sonic-net#3799) (2025-03-11) [mssonicbld] * 357f95d - enable pfcwd for backplane ports (sonic-net#3796) (2025-03-07) [mssonicbld] * 7f316e7 - revert YANG check in db_migrator (sonic-net#3794) (2025-03-06) [mssonicbld] * c01a4f5 - Add namespace support for show interface neighbor expected (sonic-net#3790) (2025-03-03) [mssonicbld] * 17a7b18 - Fix `vnet_route_check` for active and inactive routes, add `--all` option (sonic-net#3780) (2025-02-25) [mssonicbld] * 5cc1012 - [202411][FC] remove FC delay field (sonic-net#3768) (2025-02-21) [Stepan Blyshchak] * 8ceba38 - [QOS] Skip showing unnecessary warning message (sonic-net#3762) (2025-02-11) [mssonicbld] * 04b60e2 - Fix call for spanning-tree commands in dump script (sonic-net#3752) (2025-02-07) [mssonicbld] * bbe29ae - [show][interface] Add changes for show interface errors command (sonic-net#3749) (2025-02-04) [mssonicbld]<br>```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Added the options
-aand--alltoscripts/vnet_route_check.py. Both options are equivalent. If none of them is provided, then when finding the VNET routes that are in APP DB but not in ASIC DB, we will ignore routes in APP DB that are not active.Mock tests in
tests/test_vnet_route_check.pyare added to test this behavior.How I did it
If
-aand--allare not provided, we first filter routes in APP DB to find active routes and then check which active routes are not in ASIC DB. The status of each route is retrieved from STATE DB. If a route is not found in STATE DB, then it is considered to be active.How to verify it
You can verify the behavior by running mock tests in
tests/test_vnet_route_check.py, or by manually running thevnet_route_check.pyscript on a DUT.Previous command output (if the output of a command-line utility has changed)
N/A
New command output (if the output of a command-line utility has changed)
N/A