-
Notifications
You must be signed in to change notification settings - Fork 718
Fix vnet_route_check
for active and inactive routes, add --all
option
#3763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix vnet_route_check
for active and inactive routes, add --all
option
#3763
Conversation
… we will not check whether inactive APP DB VNET routes are in ASIC DB or not. Added mock tests to test this behavior. Signed-off-by: Mahdi Ramezani <[email protected]>
Signed-off-by: Mahdi Ramezani <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@mramezani95 , can you provide a sample output before and after this fix? |
@PrasadSamudrala, please review |
-a
and --all
to scripts/vnet_route_check.py
vnet_route_check
for active and inactive routes, add --all
option
Signed-off-by: Mahdi Ramezani <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Mahdi Ramezani <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…s not support it. Signed-off-by: Mahdi Ramezani <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
The format of the output has not changed. This fix only affects which routes are included in the output. Here is an example output:
There is no output if there are no discrepancies between VNET routes in ASIC DB and APP DB. |
Signed-off-by: Mahdi Ramezani <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Mahdi Ramezani <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Mahdi Ramezani <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Mahdi Ramezani <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Mahdi Ramezani <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@kperumalbfn , please take this fix for next 202411 image |
@prsunny Added to 202411 |
Cherry-pick PR to 202411: #3780 |
@mramezani95 Can you open a direct PR to 202405 to address conflict? |
Signed-off-by: Mahdi Ramezani <[email protected]>
…--all` option (#3808) * Ported from PR #3763 for the master branch. Signed-off-by: Mahdi Ramezani <[email protected]>
…tion (sonic-net#3763) 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.
What I did
Added the options
-a
and--all
toscripts/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 thevnet_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