Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dualtor] Add script to verify consistency between kernel and ASIC (#…
…2840) #### What I did Add script `dualtor_neighbor_check.py` to verify the neighbor consistency based on the mux state. It will have the following output: ``` NEIGHBOR MAC PORT MUX_STATE IN_MUX_TOGGLE NEIGHBOR_IN_ASIC TUNNERL_IN_ASIC HWSTATUS ------------- ----------------- ---------- ----------- --------------- ------------------ ----------------- ---------- 192.168.0.2 ee:86:d8:46:7d:01 Ethernet4 standby False no yes consistent 192.168.0.3 86:73:c2:22:bf:02 Ethernet8 standby False no yes consistent 192.168.0.24 56:a6:bf:c5:dd:17 Ethernet92 active False yes no consistent 192.168.0.25 3a:18:56:f5:02:18 Ethernet96 active False yes no consistent 192.168.0.100 00:00:00:00:00:00 N/A N/A N/A no yes consistent ``` Signed-off-by: Longxiang Lyu <[email protected]> #### How I did it the workflow of this scripts: 1. for non-zero-mac neighbors in `APPL_DB` `NEIGH_TABLE`, use the `ASIC_DB` fdb entries to find the mux port that it belongs to. 2. check if the neighbor is consistent with mux state: * if mux state is `active`, the neighbor is consistent only if the neighbor is present in `ASIC_DB` but no tunnel route. * if mux state is `standby`, the neighbor is consistent only if the tunnel route is present in `ASIC_DB`1 but no neighbor. 3. if there are any inconsistent neighbors and the mux port is currently in-toggle, the script will have a non-zero negative return, and will write error messages to logs. #### How to verify it UT and verify on testbed. #### Previous command output (if the output of a command-line utility has changed) #### New command output (if the output of a command-line utility has changed)
- Loading branch information