[action] [PR:703] [SmartSwitch] Add graceful shutdown and startup handling in platform daemons #726
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
HLD: https://github.com/sonic-net/SONiC/blob/master/doc/smart-switch/graceful-shutdown/graceful-shutdown.md
These changes build upon enhancements in
sonic-platform-daemons#667This PR introduces graceful shutdown and startup orchestration across SONiC platform daemons to ensure safe DPU and peripheral module transitions during reboot or administrative state changes.
Key updates include:
ModuleBaselifecycle methods (module_pre_shutdown,module_post_startup, andset_admin_state_gracefully) into platform daemons.CHASSIS_MODULE_TABLEviaSTATE_DBto synchronize transition state across processes.Motivation and Context
Platform daemons currently perform shutdown and startup independently, leading to:
This change introduces a unified graceful shutdown framework for SmartSwitch modules.
It ensures predictable module transitions, preserves hardware health, and supports orchestrated restarts without transient hardware errors.
How Has This Been Tested?
Testing performed on both DPU-enabled (SmartSwitch).
Functional validation
detaching/attaching) reflected inSTATE_DB.pcieddaemon logs confirm ordered detach before reboot and reattach after startup.Unit tests executed
Coverage includes:
Manual validation
Additional Information (Optional)