Skip to content

Commit

Permalink
Delay pmon non-critical daemon
Browse files Browse the repository at this point in the history
Signed-off-by: Yuanzhe, Liu <[email protected]>
  • Loading branch information
yuazhe committed Apr 24, 2024
1 parent bf592f6 commit 761309d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"skip_ledd": true,
"skip_fancontrol": true,
"delay_xcvrd": true,
"skip_xcvrd_cmis_mgr": true
"skip_xcvrd_cmis_mgr": true,
"delay_non_critical_daemon": true
}

7 changes: 7 additions & 0 deletions dockers/docker-platform-monitor/delay.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env python3

# This file serves as a monitor for advanced reboot.
# Once it exits, the delayed daemon will initiate.

from swsscommon.swsscommon import RestartWaiter
RestartWaiter.waitAdvancedBootDone()
21 changes: 15 additions & 6 deletions dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true

{% if delay_non_critical_daemon %}
[program:delay]
command=python3 /usr/bin/delay.py
autostart=false
autorestart=false
startsecs=0
dependent_startup=true
{% endif %}

{% if not skip_chassisd and IS_MODULAR_CHASSIS == 1 %}
[program:chassisd]
command=/usr/local/bin/chassisd
Expand Down Expand Up @@ -64,7 +73,7 @@ stdout_logfile=syslog
stderr_logfile=syslog
startsecs=0
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
dependent_startup_wait_for=rsyslogd:running {% if delay_non_critical_daemon %}delay:exited{% endif %}
{% endif %}

{% if not skip_fancontrol and HAVE_FANCONTROL_CONF == 1 %}
Expand Down Expand Up @@ -151,7 +160,7 @@ stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
dependent_startup_wait_for=rsyslogd:running {% if delay_non_critical_daemon %}delay:exited{% endif %}
{% endif %}

{% if not skip_syseepromd %}
Expand All @@ -164,7 +173,7 @@ stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
dependent_startup_wait_for=rsyslogd:running {% if delay_non_critical_daemon %}delay:exited{% endif %}
{% endif %}

{% if not skip_thermalctld %}
Expand All @@ -178,7 +187,7 @@ stderr_logfile=syslog
startsecs=10
startretries=50
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
dependent_startup_wait_for=rsyslogd:running {% if delay_non_critical_daemon %}delay:exited{% endif %}
{% endif %}

{% if not skip_pcied %}
Expand All @@ -191,7 +200,7 @@ stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
dependent_startup_wait_for=rsyslogd:running {% if delay_non_critical_daemon %}delay:exited{% endif %}
{% endif %}

{% if include_sensormond %}
Expand All @@ -204,5 +213,5 @@ stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
dependent_startup_wait_for=rsyslogd:running {% if delay_non_critical_daemon %}delay:exited{% endif %}
{% endif %}

0 comments on commit 761309d

Please sign in to comment.