Skip to content
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

[code sync] Merge code from sonic-net/sonic-utilities:202205 to 202205 #19

Merged
merged 4 commits into from
Jul 21, 2023

Conversation

mssonicbld
Copy link
Collaborator

* 99864640 - (head/202205) [dualtor] Add script to verify consistency between kernel and ASIC  (#2840) (2023-07-21) [Longxiang Lyu]
* a32ddc1b - [show][muxcable] update `show mux config` to print out `soc_ipv6` as well  (#2909) (2023-07-21) [Jing Zhang]
* 0c6d0c51 - [202205] Flush RESTAPI db in fast-reboot shutdown path (#2921) (2023-07-20) [bingwang-ms]<br>```

bingwang-ms and others added 4 commits July 20, 2023 16:12
* Flush RESTAPI db in fast-reboot shutdown path
…well (#2909)

Update `show mux config` to print soc_ipv6 as well if it exists. 

sign-off: Jing Zhang [email protected]
…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)
@mssonicbld mssonicbld merged commit 0a38fe4 into sonic-net:202205 Jul 21, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants