Skip to content

Commit

Permalink
[syncd] skip ledinit during syncd warm start (#2285)
Browse files Browse the repository at this point in the history
* [syncd] skip ledinit during syncd warm start

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
  • Loading branch information
yxieca authored and lguohan committed Nov 22, 2018
1 parent 873df9d commit 4abbe43
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions files/scripts/syncd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,13 @@ start() {

debug "Warm boot flag: ${SERVICE} ${WARM_BOOT}."

# Don't flush DB during warm boot
if [[ x"$WARM_BOOT" != x"true" ]]; then
if [[ x"$WARM_BOOT" == x"true" ]]; then
# Leave a mark for syncd scripts running inside docker.
touch /host/warmboot/warm-starting
else
rm -f /host/warmboot/warm-starting

# Flush DB during non-warm start
/usr/bin/docker exec database redis-cli -n 1 FLUSHDB

# platform specific tasks
Expand Down
2 changes: 1 addition & 1 deletion platform/broadcom/docker-syncd-brcm/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fi
supervisorctl start syncd

# If this platform has an initialization file for the Broadcom LED microprocessor, load it
if [ -r ${PLATFORM_DIR}/led_proc_init.soc ]; then
if [ -r ${PLATFORM_DIR}/led_proc_init.soc && ! -f /var/warmboot/warm-starting ]; then
wait_syncd
supervisorctl start ledinit
fi

0 comments on commit 4abbe43

Please sign in to comment.