From c6de161658d86ecdf6b30680d0b99a1838b88056 Mon Sep 17 00:00:00 2001 From: sonic-otn Date: Wed, 22 Nov 2023 10:00:25 +0800 Subject: [PATCH] udate otss and syncd-ot script --- files/scripts/otss.sh | 6 +++--- files/scripts/syncd-ot.sh | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/files/scripts/otss.sh b/files/scripts/otss.sh index 808a38d6b77e..6b2f5e8fa86d 100755 --- a/files/scripts/otss.sh +++ b/files/scripts/otss.sh @@ -92,9 +92,9 @@ stop() { DEV=$2 -SERVICE="swss" -DEBUGLOG="/tmp/swss-syncd-debug$DEV.log" -LOCKFILE="/tmp/swss-syncd-lock$DEV" +SERVICE="otss" +DEBUGLOG="/tmp/otss-syncd-debug$DEV.log" +LOCKFILE="/tmp/otss-syncd-lock$DEV" NAMESPACE_PREFIX="asic" if [ "$DEV" ]; then NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace diff --git a/files/scripts/syncd-ot.sh b/files/scripts/syncd-ot.sh index 4c624c35bf04..367366600f23 100755 --- a/files/scripts/syncd-ot.sh +++ b/files/scripts/syncd-ot.sh @@ -4,34 +4,34 @@ function stopplatform1() { - debug "shutdown syncd process ..." - /usr/bin/docker exec -i syncd$DEV /usr/bin/syncd_request_shutdown --cold + debug "shutdown syncd-ot process ..." + /usr/bin/docker exec -i syncd-ot$DEV /usr/bin/syncd_request_shutdown --cold - # wait until syncd quits gracefully or force syncd to exit after + # wait until syncd-ot quits gracefully or force syncd-ot to exit after # waiting for 20 seconds start_in_secs=${SECONDS} end_in_secs=${SECONDS} timer_threshold=20 - while docker top syncd$DEV | grep -q /usr/bin/syncd \ + while docker top syncd-ot$DEV | grep -q /usr/bin/syncd-ot \ && [[ $((end_in_secs - start_in_secs)) -le $timer_threshold ]]; do sleep 0.1 end_in_secs=${SECONDS} done if [[ $((end_in_secs - start_in_secs)) -gt $timer_threshold ]]; then - debug "syncd process in container syncd$DEV did not exit gracefully" + debug "syncd-ot process in container syncd-ot$DEV did not exit gracefully" fi - /usr/bin/docker exec -i syncd$DEV /bin/sync - debug "Finished shutdown syncd process ..." + /usr/bin/docker exec -i syncd-ot$DEV /bin/sync + debug "Finished shutdown syncd-ot process ..." } OP=$1 DEV=$2 -SERVICE="syncd" -DEBUGLOG="/tmp/swss-syncd-debug$DEV.log" -LOCKFILE="/tmp/swss-syncd-lock$DEV" +SERVICE="syncd-ot" +DEBUGLOG="/tmp/swss-syncd-ot-debug$DEV.log" +LOCKFILE="/tmp/swss-syncd-ot-lock$DEV" NAMESPACE_PREFIX="asic" if [ "$DEV" ]; then NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace