From 80e878159bff4585669007afefa8f4b6f687cae1 Mon Sep 17 00:00:00 2001 From: Junhua Zhai Date: Thu, 14 Dec 2023 09:37:44 +0800 Subject: [PATCH] Fix syncd_request_shutdown coredump in config reload on KVM sonic (#17486) The issue is related to #16812. Process syncd does not run in the container gbsyncd on kvm sonic with default hwsku. Microsoft ADO : 26151608 How I did it If syncd has not run in container gbsyncd, it is not needed to trigger graceful shudown of syncd. How to verify it None of syncd_request_shutdown coredump in config reload on KVM sonic --- files/scripts/gbsyncd.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/scripts/gbsyncd.sh b/files/scripts/gbsyncd.sh index fc6b018b3ad7..34bcb7044bed 100755 --- a/files/scripts/gbsyncd.sh +++ b/files/scripts/gbsyncd.sh @@ -20,6 +20,11 @@ function waitplatform() { } function stopplatform1() { + if ! docker top gbsyncd$DEV | grep -q /usr/bin/syncd; then + debug "syncd process in container gbsyncd$DEV is not running" + return + fi + # Invoke platform specific pre shutdown routine. PLATFORM=`$SONIC_DB_CLI CONFIG_DB hget 'DEVICE_METADATA|localhost' platform` PLATFORM_PRE_SHUTDOWN="/usr/share/sonic/device/$PLATFORM/plugins/gbsyncd_request_pre_shutdown"