Skip to content

[dashha]: Acknowledge switch-owned HA switching_to_active - #4820

Open
zjswhhh wants to merge 1 commit into
sonic-net:masterfrom
zjswhhh:fix-dashha-switching-to-active-state
Open

[dashha]: Acknowledge switch-owned HA switching_to_active#4820
zjswhhh wants to merge 1 commit into
sonic-net:masterfrom
zjswhhh:fix-dashha-switching-to-active-state

Conversation

@zjswhhh

@zjswhhh zjswhhh commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What I did

Map HA_ROLE_SWITCHING_TO_ACTIVE to SAI_DASH_HA_STATE_INITIALIZING_TO_ACTIVE for switch-owned HA scopes.

Keep the existing non-dead transition behavior so cached software BFD sessions are created when the scope starts switching to active. Add focused mock coverage for the state, role, and BFD invocation.

Why I did it

Switch-owned HA scopes do not rely on HA scope notifications to acknowledge role transitions. The existing code returned without updating DPU_STATE_DB or the in-memory state for HA_ROLE_SWITCHING_TO_ACTIVE, leaving the transition unacknowledged.

How I verified it

  • Compiled the modified production and mock-test translation units with the project's warning-as-error flags.
  • Built and linked the x86-64 orchagent binary successfully.
  • git diff --check passed.

Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
@zjswhhh
zjswhhh requested a review from prsunny as a code owner August 6, 2026 17:56
Copilot AI lite review requested due to automatic review settings August 6, 2026 17:56
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@zjswhhh zjswhhh changed the title [dashha]: Initialize switch-owned activating HA scope [dashha]: Acknowledge switch-owned HA activation Aug 6, 2026
@zjswhhh zjswhhh changed the title [dashha]: Acknowledge switch-owned HA activation [dashha]: Acknowledge switch-owned HA switching_to_active Aug 6, 2026
@zjswhhh
zjswhhh requested review from BYGX-wcr and vivekrnv August 6, 2026 23:01
@zjswhhh
zjswhhh marked this pull request as draft August 7, 2026 00:56
@zjswhhh
zjswhhh marked this pull request as ready for review August 7, 2026 04:18
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@vivekrnv

vivekrnv commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Validated this change and is working

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