Skip to content

Commit

Permalink
[route_check.py] - update includes checks on subscriptions (#1344)
Browse files Browse the repository at this point in the history
Summary: Improve the tool to handle the possible latency between APPL-DB & ASIC-DB by looking at subscription messages.

- What I did
The routes flow from APPL-DB to ASIC-DB, via orchagent.
This tool's job is to verify that all routes added to APPL-DB do
get into ASIC-DB and all routes removed from APPL-DB are deleted from ASIC-DB.

- How I did it
NOTE: The flow from APPL-DB to ASIC-DB takes non zero milliseconds.
1) Initiate subscribe for ASIC-DB updates.
2) Read APPL-DB & ASIC-DB
3) Get the diff.
4) If any diff,
4.1) Collect subscribe messages for a second
4.2) check diff against the subscribe messages
5) Rule out local interfaces & default routes
6) If still outstanding diffs, report failure.

- How to verify it
Run this tool in SONiC switch and watch the result. In case of failure
checkout the result to validate the failure.
To simulate failure:
Stop Orchagent.
Run this tool, and likely you would see some failures.
You could potentially remove / add routes in APPL / ASIC DBs with orchagent
down to ensure failure.
Analyze the reported failures to match expected.
You may use the exit code to verify the result as success or not.
  • Loading branch information
renukamanavalan committed Jan 11, 2021
1 parent 0a4365a commit b18ef5a
Show file tree
Hide file tree
Showing 2 changed files with 669 additions and 44 deletions.
Loading

0 comments on commit b18ef5a

Please sign in to comment.