Skip to content

[action] [PR:3990] vnet_route_check.py should not report VNET routes in APP DB but not in STATE DB and ASIC DB as mismatches#3991

Merged
mssonicbld merged 1 commit intosonic-net:202505from
mssonicbld:cherry/202505/3990
Jul 22, 2025
Merged

[action] [PR:3990] vnet_route_check.py should not report VNET routes in APP DB but not in STATE DB and ASIC DB as mismatches#3991
mssonicbld merged 1 commit intosonic-net:202505from
mssonicbld:cherry/202505/3990

Conversation

@mssonicbld
Copy link
Collaborator

What I did

Changed vnet_route_check.py so that when a VNET route is missing in STATE DB, then it is treated as an inactive route. This means that when the script is called without -a and --all options, if a route in APP DB is missing in both STATE DB and ASIC DB, it will not be reported as a mismatch.

How I did it

  1. Changed the logic in vnet_route_check.py.
  2. Added a new test and modified an existing test in vnet_route_check_test.py to verify the desired behavior.

How to verify it

Run the tests in vnet_route_check_test.py.

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

… in STATE DB and ASIC DB as mismatches

<!--
    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
Changed `vnet_route_check.py` so that when a VNET route is missing in STATE DB, then it is treated as an inactive route. This means that when the script is called without `-a` and `--all` options, if a route in APP DB is missing in both STATE DB and ASIC DB, it will not be reported as a mismatch.

#### How I did it
1. Changed the logic in `vnet_route_check.py`.
2. Added a new test and modified an existing test in `vnet_route_check_test.py` to verify the desired behavior.

#### How to verify it
Run the tests in `vnet_route_check_test.py`.

#### 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
@mssonicbld
Copy link
Collaborator Author

Original PR: #3990

@mssonicbld
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit 42b28bb into sonic-net:202505 Jul 22, 2025
7 checks passed
kktheballer pushed a commit to kktheballer/sonic-utilities that referenced this pull request Jan 14, 2026
```<br>* 42b28bb - (HEAD -> 202506, origin/202505) `vnet_route_check.py` should not report VNET routes in APP DB but not in STATE DB and ASIC DB as mismatches (sonic-net#3991) (2025-07-22) [mssonicbld]
* f36ac95 - [show][config][plugin] add processing of ModuleNotFoundError with log_warning (sonic-net#3992) (2025-07-22) [mssonicbld]
* 6a4a8ff - [sonic-package-manager] Save tag that was used to install the application (sonic-net#3975) (2025-07-16) [mssonicbld]
* 54a961f - [SPM] Add support for configuring systemd service Type in package manifests (sonic-net#3974) (2025-07-15) [mssonicbld]
* 0b977d1 - [trim]: Add Packet Trimming Asym DSCP CLI (sonic-net#3971) (2025-07-14) [mssonicbld]
* b51e117 - Add GCU Support for SKU Mellanox-SN4280-C48/O8C40/O8V40 (sonic-net#3965) (2025-07-10) [mssonicbld]
* dbc5be9 - [Arista] Add support for LodogaPrime platform (sonic-net#3966) (2025-07-10) [mssonicbld]<br>```
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.

1 participant