[dualtor] Add script to verify consistency between kernel and ASIC #2840
[dualtor] Add script to verify consistency between kernel and ASIC #2840lolyu merged 19 commits intosonic-net:masterfrom
Conversation
|
@lolyu Are you able to pass the coverage checker? |
|
Discussed with Guohan offline, is it better if we integrate this script with existing route_checker.py? Both scripts are for consistency checking. |
It is hard to integrate this with |
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
709f676 to
9b3f440
Compare
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
58f1e71 to
a6678a7
Compare
What I did As the subject. This PR is to leave the vlan neighbor route checking to dualtor_neighbor_check.py script: #2840 Signed-off-by: Longxiang Lyu [email protected] How I did it If any misses are found on dualtor, ignore those vlan neighbor misses. How to verify it UT and verify on testbed.
What I did As the subject. This PR is to leave the vlan neighbor route checking to dualtor_neighbor_check.py script: #2840 Signed-off-by: Longxiang Lyu [email protected] How I did it If any misses are found on dualtor, ignore those vlan neighbor misses. How to verify it UT and verify on testbed.
|
@lolyu do we have ADO for this? Pls add tag for branches which need this fix. |
What I did As the subject. This PR is to leave the vlan neighbor route checking to dualtor_neighbor_check.py script: #2840 Signed-off-by: Longxiang Lyu [email protected] How I did it If any misses are found on dualtor, ignore those vlan neighbor misses. How to verify it UT and verify on testbed.
…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)
What I did As the subject. This PR is to leave the vlan neighbor route checking to dualtor_neighbor_check.py script: sonic-net#2840 Signed-off-by: Longxiang Lyu [email protected] How I did it If any misses are found on dualtor, ignore those vlan neighbor misses. How to verify it UT and verify on testbed.
…onic-net#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)
…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)
What I did As the subject. This PR is to leave the vlan neighbor route checking to dualtor_neighbor_check.py script: sonic-net#2840 Signed-off-by: Longxiang Lyu [email protected] How I did it If any misses are found on dualtor, ignore those vlan neighbor misses. How to verify it UT and verify on testbed.
…onic-net#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)
|
Hi @yxieca, could you please help cherry-pick this into |
…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)
Work item tracking
What I did
Add script
dualtor_neighbor_check.pyto verify the neighbor consistencybased on the mux state. It will have the following output:
Signed-off-by: Longxiang Lyu [email protected]
How I did it
the workflow of this scripts:
APPL_DBNEIGH_TABLE, use theASIC_DBfdb entries to find the mux port that it belongs to.active, the neighbor is consistent only if the neighbor is present inASIC_DBbut no tunnel route.standby, the neighbor is consistent only if the tunnel route is present inASIC_DB1 but no neighbor.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)