[swss service] flush fast-reboot enabled flag upon swss stopping (#3908)
If we need to stop swss during fast-reboot procedure on the boot up path, it means that something went wrong, like syncd/orchagent crashed already, we are stopping and restarting swss/syncd to re-initialize. In this case, we should proceed as if it is a cold reboot. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
This commit is contained in:
parent
1286e5ed3f
commit
9baf8f7c33
@ -161,6 +161,13 @@ stop() {
|
|||||||
/usr/bin/${SERVICE}.sh stop
|
/usr/bin/${SERVICE}.sh stop
|
||||||
debug "Stopped ${SERVICE} service..."
|
debug "Stopped ${SERVICE} service..."
|
||||||
|
|
||||||
|
# Flush FAST_REBOOT table when swss needs to stop. The only
|
||||||
|
# time when this would take effect is when fast-reboot
|
||||||
|
# encountered error, e.g. syncd crashed. And swss needs to
|
||||||
|
# be restarted.
|
||||||
|
debug "Clearing FAST_REBOOT flag..."
|
||||||
|
clean_up_tables 6 "'FAST_REBOOT*'"
|
||||||
|
|
||||||
# Unlock has to happen before reaching out to peer service
|
# Unlock has to happen before reaching out to peer service
|
||||||
unlock_service_state_change
|
unlock_service_state_change
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user