Skip to content

Commit

Permalink
udate otss and syncd-ot script
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic-otn committed Nov 22, 2023
1 parent 779c517 commit c6de161
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions files/scripts/otss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions files/scripts/syncd-ot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c6de161

Please sign in to comment.