Enable SAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL attribute (#9419)

Why I did it
Fixes #8980 partly.

The corresponding changes in sonic-sairedis is here :
Azure/sonic-sairedis#975

How I did it
Include changes from both repos and build an image for verification.

How to verify it
Trigger fast-reboot with the changes, see the attribute SAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL being set at the SAI level.

Signed-off-by: Thushar Gowda <24815472+tbgowda@users.noreply.github.com>
This commit is contained in:
tbgowda 2022-02-01 08:44:17 -08:00 committed by GitHub
parent e7877bf9df
commit 4e32f85a31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,6 +48,15 @@ function check_warm_boot()
fi
}
function check_fast_boot()
{
if [[ $($SONIC_DB_CLI STATE_DB GET "FAST_REBOOT|system") == "1" ]]; then
FAST_BOOT="true"
else
FAST_BOOT="false"
fi
}
function wait_for_database_service()
{
# Wait for redis server start before database clean
@ -140,10 +149,14 @@ stop() {
lock_service_state_change
check_warm_boot
check_fast_boot
debug "Warm boot flag: ${SERVICE}$DEV ${WARM_BOOT}."
debug "Fast boot flag: ${SERVICE}$DEV ${FAST_BOOT}."
if [[ x"$WARM_BOOT" == x"true" ]]; then
TYPE=warm
elif [[ x"$FAST_BOOT" == x"true" ]]; then
TYPE=fast
else
TYPE=cold
fi