Skip to content

dualtor_neighbor_check.py changed#3931

Merged
qiluo-msft merged 6 commits intosonic-net:masterfrom
manamand2020:dualtor_neigh_check
Oct 30, 2025
Merged

dualtor_neighbor_check.py changed#3931
qiluo-msft merged 6 commits intosonic-net:masterfrom
manamand2020:dualtor_neigh_check

Conversation

@manamand2020
Copy link
Contributor

What I did

dualtor_neighbor_check.py script needs this change based on changes in the following PR:
sonic-net/sonic-swss#3722

neighbors are no more deleted during switchover to standby

How I did it

How to verify it

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
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@manamand2020 manamand2020 force-pushed the dualtor_neigh_check branch from acaa441 to 5e72c89 Compare June 23, 2025 10:23
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@zjswhhh zjswhhh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please evaluate on the backward compatibility. This needs to check in with the no_host_route change.

Signed-off-by: Manas Kumar Mandal <manamand@cisco.com>
@manamand2020 manamand2020 force-pushed the dualtor_neigh_check branch from 5e72c89 to 197fc05 Compare July 9, 2025 22:36
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Manas Kumar Mandal <manamand@cisco.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zjswhhh
Copy link
Contributor

zjswhhh commented Jul 23, 2025

@manamand2020 - can you please address the precommit failures.

Signed-off-by: Manas Kumar Mandal <manamand@cisco.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Manas Kumar Mandal <manamand@cisco.com>
@manamand2020 manamand2020 force-pushed the dualtor_neigh_check branch from f49506a to d4414d8 Compare July 25, 2025 00:55
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@manamand2020 manamand2020 force-pushed the dualtor_neigh_check branch from 62a3c6b to df62614 Compare July 25, 2025 09:34
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@manamand2020 manamand2020 force-pushed the dualtor_neigh_check branch from 4b3d350 to 96b0157 Compare July 26, 2025 04:40
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@manamand2020
Copy link
Contributor Author

Hi @manamand2020, Looks like test are failing because 'asic_nexthop_table' key is missing. I think you would just need to define that in the test scrips if I'm not mistaken image

@Ndancejic I fixed it.

zjswhhh
zjswhhh previously approved these changes Jul 28, 2025
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@manamand2020 manamand2020 force-pushed the dualtor_neigh_check branch from 86c3c8c to 9ccc5ae Compare July 28, 2025 19:56
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Manas Kumar Mandal <manamand@cisco.com>
@manamand2020 manamand2020 force-pushed the dualtor_neigh_check branch from 9ccc5ae to 3843ddb Compare July 28, 2025 23:53
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

yxieca pushed a commit to Azure/sonic-utilities.msft that referenced this pull request Jul 30, 2025
What I did
Port the fix from sonic-net/sonic-utilities#3931

How to verify it
Verified original PR on hardware.

Signed-off-by: Manas Kumar Mandal <manamand@cisco.com>
@zjswhhh
Copy link
Contributor

zjswhhh commented Oct 23, 2025

Hi @qiluo-msft - please help merge.

@qiluo-msft qiluo-msft requested a review from Copilot October 29, 2025 18:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the dualtor neighbor check functionality by adding nexthop type verification to better identify neighbor routing inconsistencies. The change distinguishes between NEIGHBOR and TUNNEL nexthop types when validating neighbor entries against mux states.

  • Adds nexthop table reading from ASIC_DB to capture nexthop type information
  • Updates the consistency check logic to verify that active mux states use NEIGHBOR nexthops and standby states use TUNNEL nexthops
  • Adds two new test cases to verify SOC IP neighbor handling and multiple neighbor scenarios

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/dualtor_neighbor_check.py Implements nexthop table reading in Lua script, adds nexthop type tracking and validation logic in consistency checks
tests/dualtor_neighbor_check_test.py Updates all existing tests with nexthop_table parameter and expected outputs, adds new tests for SOC IP neighbors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@qiluo-msft qiluo-msft merged commit 7cc435b into sonic-net:master Oct 30, 2025
13 checks passed
gordon-nexthop pushed a commit to nexthop-ai/sonic-utilities that referenced this pull request Nov 25, 2025
What I did
dualtor_neighbor_check.py script needs this change based on changes in the following PR:
sonic-net/sonic-swss#3722

neighbors are no more deleted during switchover to standby
@prsunny prsunny requested a review from lolyu November 25, 2025 17:47
@prsunny
Copy link
Contributor

prsunny commented Nov 25, 2025

@manamand2020 , @zjswhhh , is this backward compatible?. Is there an HLD? Need to see how the output was before and what is the output with this change

prsunny added a commit that referenced this pull request Nov 25, 2025
qiluo-msft pushed a commit that referenced this pull request Nov 27, 2025
Reverts #3931

Reverting for backward compatibility issues.
YairRaviv pushed a commit to YairRaviv/sonic-utilities that referenced this pull request Jan 12, 2026
What I did
dualtor_neighbor_check.py script needs this change based on changes in the following PR:
sonic-net/sonic-swss#3722

neighbors are no more deleted during switchover to standby
YairRaviv pushed a commit to YairRaviv/sonic-utilities that referenced this pull request Jan 12, 2026
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.

7 participants