Skip to content

Commit 1474ad7

Browse files
authored
[Mellanox] [pmon] Fix for PMON service not starting when restarting SWSS service after fast/warm reboot (#10901)
- Why I did it Recent change to delay PMON service in case of fast/warm reboot introduce an issue when restarting only SWSS service after fast/warm reboot for Nvidia platform. Since the timer is triggered only when the system boot, in a scenario when the system is after a fast/warm reboot and the user restart SWSS service, as part of syncd.sh script, PMON service will stop but the timer will not start again. - How I did it On syncd.sh script, in case of fast/warm indication, check if pmon.timer is running. If it is running it means we are at the first boot and continue normally. If it is not running, meaning the service was restarted, start the timer to keep the system behavior consistent. - How to verify it Run fast/warm reboot. service swss restart. Observe PMON service starting. Signed-off-by: Shlomi Bitton <[email protected]>
1 parent b6811a5 commit 1474ad7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

files/scripts/syncd.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ function waitplatform() {
4848
BOOT_TYPE=`getBootType`
4949
if [[ x"$sonic_asic_platform" == x"mellanox" ]]; then
5050
if [[ x"$BOOT_TYPE" = @(x"fast"|x"warm"|x"fastfast") ]]; then
51-
debug "PMON service is delayed by a timer for better fast/warm boot performance"
51+
PMON_TIMER_STATUS=$(systemctl is-active pmon.timer)
52+
if [[ x"$PMON_TIMER_STATUS" = x"inactive" ]]; then
53+
systemctl start pmon.timer
54+
else
55+
debug "PMON service is delayed by a timer for better fast/warm boot performance"
56+
fi
5257
else
5358
debug "Starting pmon service..."
5459
/bin/systemctl start pmon

0 commit comments

Comments
 (0)