Skip to content

Implement HA-Scope actor #73

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

Open
wants to merge 113 commits into
base: master
Choose a base branch
from

Conversation

yue-fred-gao
Copy link
Collaborator

why

According to HAMGR design at https://github.com/r12f/SONiC/blob/user/r12f/hamgrd/doc/smart-switch/high-availability/smart-switch-ha-hamgrd.md, we need ha-scope actor to program dpu DASH_HA_SCOPE_TABLE and npu STATE_DB DASH_HA_SCOPE_STATE. It is the main actor to coordinate between DPU and SDN controller to bring HA up or down in DPU.

what this PR does

Initialization: Receives a DASH_HA_SCOPE_CONFIG_TABLE with disable=true, sets up initial state, registers with vDPU and HaSet.
State Updates: Receives state from HaSet and vDPU, updates DPU and NPU state tables.
Role Activation: Handles admin request to enable HA via DASH_HA_SCOPE_CONFIG_TABLE with disable=false, processes pending activation, waits for approval, then triggers DPU to activate the role.
Role Activated: Once DPU confirms, notifies vDPU and updates NPU state.
Planned Shutdown: Handles admin request to set HA state to "dead", notifies vDPU, and updates state accordingly.

yue-fred-gao and others added 30 commits April 8, 2025 18:13
swbus-cli needs to display the result
 - Fix compilation warnings
 - Reduce the use of global edge runtime, which is bad for running
   tests in parallel
 - Introduce ha_actor_messages to formalize the message key for actors
 - Spawn common bridge to send selected dpu_state update to local dpu
The reason is in dpu test, Dpu actor will try to connect
config_db with db_named. That will implicitly initialize
SonicDBConfig. So when later test_get_dpu_config_from_db
tries to initialize SonicDBConfig, it complains.

This reverts commit 8c0285d.
@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

 - Move dpu_appl_db id to 14 because redis only supports 16 ids
 - Fix some lint warning
 - Added some tracing for debugging
@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yue-fred-gao
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yue-fred-gao
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yue-fred-gao
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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