From 447f0c64da82737a84f1e74dab7af54df7271317 Mon Sep 17 00:00:00 2001 From: Sujin Kang Date: Wed, 4 Aug 2021 09:57:54 -0700 Subject: [PATCH] [pmon]: Enable Autorestart of the daemons in PMON for unexpected exit cases (#8326) Remove the daemon list from the critical_process which prevent the PMON from restarting when the individual daemon crashes. --- .../critical_processes | 3 --- .../docker-pmon.supervisord.conf.j2 | 20 +++++++++---------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/dockers/docker-platform-monitor/critical_processes b/dockers/docker-platform-monitor/critical_processes index 3165d13ecd..e69de29bb2 100644 --- a/dockers/docker-platform-monitor/critical_processes +++ b/dockers/docker-platform-monitor/critical_processes @@ -1,3 +0,0 @@ -program:ledd -program:xcvrd -program:psud diff --git a/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 b/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 index 90b6d5dfe7..b7eca4103e 100644 --- a/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 +++ b/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 @@ -33,10 +33,10 @@ dependent_startup=true command=/usr/local/bin/chassisd priority=3 autostart=false -autorestart=false +autorestart=unexpected stdout_logfile=syslog stderr_logfile=syslog -startsecs=0 +startsecs=10 dependent_startup=true dependent_startup_wait_for=rsyslogd:running {% endif %} @@ -45,10 +45,10 @@ dependent_startup_wait_for=rsyslogd:running command=/usr/local/bin/chassis_db_init priority=3 autostart=false -autorestart=false +autorestart=unexpected stdout_logfile=syslog stderr_logfile=syslog -startsecs=0 +startsecs=10 dependent_startup=true dependent_startup_wait_for=rsyslogd:running @@ -83,10 +83,10 @@ dependent_startup_wait_for=rsyslogd:running command={% if API_VERSION == 3 and 'ledd' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/ledd priority=5 autostart=false -autorestart=false +autorestart=unexpected stdout_logfile=syslog stderr_logfile=syslog -startsecs=0 +startsecs=10 dependent_startup=true dependent_startup_wait_for=rsyslogd:running {% endif %} @@ -100,10 +100,10 @@ command={% if API_VERSION == 3 and 'xcvrd' not in python2_daemons %}python3 {% e {% endif %} priority=6 autostart=false -autorestart=false +autorestart=unexpected stdout_logfile=syslog stderr_logfile=syslog -startsecs=0 +startsecs=10 dependent_startup=true dependent_startup_wait_for=rsyslogd:running {% endif %} @@ -113,10 +113,10 @@ dependent_startup_wait_for=rsyslogd:running command={% if API_VERSION == 3 and 'psud' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/psud priority=7 autostart=false -autorestart=false +autorestart=unexpected stdout_logfile=syslog stderr_logfile=syslog -startsecs=0 +startsecs=10 dependent_startup=true dependent_startup_wait_for=rsyslogd:running {% endif %}