[202205] Clear teamd-timer when finalizing fast-reboot (#14295)

* Clear teamd-timer when finalizing fast-reboot
* Move config save after finalizing fast/warm reboot
This commit is contained in:
Stepan Blyshchak 2023-03-22 21:07:58 +02:00 committed by GitHub
parent 8495a17228
commit e2ed36c764
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,6 +112,7 @@ function finalize_fast_reboot()
{
debug "Finalizing fast-reboot..."
sonic-db-cli STATE_DB hset "FAST_RESTART_ENABLE_TABLE|system" "enable" "false" &>/dev/null
sonic-db-cli CONFIG_DB DEL "WARM_RESTART|teamd" &>/dev/null
}
function stop_control_plane_assistant()
@ -169,10 +170,6 @@ if [[ (x"${WARM_BOOT}" == x"true") && (x"${FAST_REBOOT}" != x"true") ]]; then
stop_control_plane_assistant
fi
# Save DB after stopped control plane assistant to avoid extra entries
debug "Save in-memory database after warm/fast reboot ..."
config save -y
if [[ -n "${list}" ]]; then
debug "Some components didn't finish reconcile: ${list} ..."
fi
@ -183,4 +180,8 @@ fi
if [ x"${WARM_BOOT}" == x"true" ]; then
finalize_warm_boot
fi
fi
# Save DB after stopped control plane assistant to avoid extra entries
debug "Save in-memory database after warm/fast reboot ..."
config save -y