Skip to content

Commit

Permalink
Enable SAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL attribute (#9419)
Browse files Browse the repository at this point in the history
Why I did it
Fixes #8980 partly.

The corresponding changes in sonic-sairedis is here :
sonic-net/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>
  • Loading branch information
tbgowda authored and qiluo-msft committed Feb 8, 2022
1 parent 7435613 commit 78dc2d8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions files/scripts/syncd_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,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
Expand Down Expand Up @@ -122,10 +131,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
Expand Down

0 comments on commit 78dc2d8

Please sign in to comment.