-
Notifications
You must be signed in to change notification settings - Fork 718
Fix for 22138: Chassisd does not wait for the execution to complete for previous admin state change requests - Replaces PR: #3845 #3937
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
Conversation
…for previous admin state change requests - replaces sonic-net#3845
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this 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 adds state transition tracking for chassis module admin state changes, ensuring no overlapping operations and timing out stale transitions.
- Introduces
StateDBHelper
and helper functions for tracking transition state in STATE_DB - Extends
shutdown_chassis_module
andstartup_chassis_module
to guard against concurrent transitions and handle timeouts - Adds comprehensive tests for transition tracking and timeout logic
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
config/chassis_modules.py | Added state-tracking helpers, ensure_statedb_connected , and updated startup/shutdown commands to include transition checks and timeouts |
tests/chassis_modules_test.py | New tests covering transition tracking, timeout behavior, and helper functions |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@rameshraghupathy could you please comment "/azpw run" to re-run the pipeline?? |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Cherry-pick PR to 202505: #3940 |
…in state change requests. Fixed issue #22138 (#607) Fixed issue #22138 Chassisd does not wait for the execution to complete for previous admin state change requests. Added support to solve this. The corresponding sonic-utilities PR is: sonic-net/sonic-utilities#3937 Motivation and Context Added a state to indicate the progress of an admin_state transition period (window) of every module in config_db. When in progress do not allow another admin_state change for that module. Mark the beginning of state transition in the CLI itself. Added a timeout also for error cases. Mark the end of state transition in chassisd
…in state change requests. Fixed issue #22138 Chassisd does not wait for the execution to complete for previous admin state change requests. Fixed issue #22138 #### Description Fixed issue #22138 Chassisd does not wait for the execution to complete for previous admin state change requests. Added support to solve this. The corresponding sonic-utilities PR is: sonic-net/sonic-utilities#3937 #### Motivation and Context Added a state to indicate the progress of an admin_state transition period (window) of every module in config_db. When in progress do not allow another admin_state change for that module. Mark the beginning of state transition in the CLI itself. Added a timeout also for error cases. Mark the end of state transition in chassisd #### How Has This Been Tested? ssue "config chassis module startup DPU0". This takes around 3 mins. Check the config_db and verify the new variable is set to True. Issue another "config chassis module startup DPU0" and also ""config chassis module shutdown DPU0". See both are blocked. Once the DPU operational state is the admin_sate check if a new config is accepted. #### Request for 202505 - [x] 202505 #### Additional Information (Optional) Goes with PR: sonic-net/sonic-utilities#3845
…in state change requests. Fixed issue #22138 (#637) Chassisd does not wait for the execution to complete for previous admin state change requests. Fixed issue #22138 #### Description Fixed issue #22138 Chassisd does not wait for the execution to complete for previous admin state change requests. Added support to solve this. The corresponding sonic-utilities PR is: sonic-net/sonic-utilities#3937 #### Motivation and Context Added a state to indicate the progress of an admin_state transition period (window) of every module in config_db. When in progress do not allow another admin_state change for that module. Mark the beginning of state transition in the CLI itself. Added a timeout also for error cases. Mark the end of state transition in chassisd #### How Has This Been Tested? ssue "config chassis module startup DPU0". This takes around 3 mins. Check the config_db and verify the new variable is set to True. Issue another "config chassis module startup DPU0" and also ""config chassis module shutdown DPU0". See both are blocked. Once the DPU operational state is the admin_sate check if a new config is accepted. #### Request for 202505 - [x] 202505 #### Additional Information (Optional) Goes with PR: sonic-net/sonic-utilities#3845
Fixed issue #22138
Replaces PR: #3845 which was closed accidentally
The corresponding sonic-platform-daemon PR is : sonic-net/sonic-platform-daemons#607
What I did
Fixed issue #22138
Chassisd does not wait for the execution to complete for previous admin state change requests. Added support to solve this.
How I did it
Added a state to indicate the progress of an admin_state transition period (window) of every module in config_db.
When in progress do not allow another admin_state change for that module.
Mark the beginning of state transition in the CLI itself. Added a timeout also for error cases.
Mark the end of state transition in chassisd.
How to verify it
Issue "config chassis module startup DPU0". This takes around 3 mins. Check the config_db and verify the new variable is set to True.
Issue another "config chassis module startup DPU0" and also ""config chassis module shutdown DPU0".
See both are blocked.
Once the DPU operational state is the admin_sate check if a new config is accepted.
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)
Request for 202505