[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:
Ying Xie 2019-12-16 07:58:16 -08:00 committed by Ying Xie
parent 49869aa6fa
commit 9583a74b47

View File

@ -146,6 +146,13 @@ stop() {
/usr/bin/${SERVICE}.sh stop
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_service_state_change