[docker-telemetry]: use service dependency in supervisord to start services
Signed-off-by: Guohan Lu <lguohan@gmail.com>
This commit is contained in:
parent
15c6282eac
commit
1cf417ed1b
@ -2,10 +2,3 @@
|
|||||||
|
|
||||||
mkdir -p /var/sonic
|
mkdir -p /var/sonic
|
||||||
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
|
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
|
||||||
|
|
||||||
rm -f /var/run/rsyslogd.pid
|
|
||||||
|
|
||||||
supervisorctl start rsyslogd
|
|
||||||
|
|
||||||
supervisorctl start telemetry
|
|
||||||
supervisorctl start dialout
|
|
||||||
|
@ -3,27 +3,39 @@ logfile_maxbytes=1MB
|
|||||||
logfile_backups=2
|
logfile_backups=2
|
||||||
nodaemon=true
|
nodaemon=true
|
||||||
|
|
||||||
|
[eventlistener:dependent-startup]
|
||||||
|
command=python -m supervisord_dependent_startup
|
||||||
|
autostart=true
|
||||||
|
autorestart=unexpected
|
||||||
|
startretries=0
|
||||||
|
exitcodes=0,3
|
||||||
|
events=PROCESS_STATE
|
||||||
|
|
||||||
[eventlistener:supervisor-proc-exit-listener]
|
[eventlistener:supervisor-proc-exit-listener]
|
||||||
command=/usr/bin/supervisor-proc-exit-listener --container-name telemetry
|
command=/usr/bin/supervisor-proc-exit-listener --container-name telemetry
|
||||||
events=PROCESS_STATE_EXITED
|
events=PROCESS_STATE_EXITED
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=false
|
autorestart=false
|
||||||
|
|
||||||
[program:start.sh]
|
|
||||||
command=/usr/bin/start.sh
|
|
||||||
priority=1
|
|
||||||
autostart=true
|
|
||||||
autorestart=false
|
|
||||||
stdout_logfile=syslog
|
|
||||||
stderr_logfile=syslog
|
|
||||||
|
|
||||||
[program:rsyslogd]
|
[program:rsyslogd]
|
||||||
command=/usr/sbin/rsyslogd -n
|
command=/usr/sbin/rsyslogd -n -iNONE
|
||||||
priority=2
|
priority=1
|
||||||
autostart=false
|
autostart=false
|
||||||
autorestart=true
|
autorestart=true
|
||||||
stdout_logfile=syslog
|
stdout_logfile=syslog
|
||||||
stderr_logfile=syslog
|
stderr_logfile=syslog
|
||||||
|
dependent_startup=true
|
||||||
|
|
||||||
|
[program:start]
|
||||||
|
command=/usr/bin/start.sh
|
||||||
|
priority=2
|
||||||
|
autostart=false
|
||||||
|
autorestart=false
|
||||||
|
startsecs=0
|
||||||
|
stdout_logfile=syslog
|
||||||
|
stderr_logfile=syslog
|
||||||
|
dependent_startup=true
|
||||||
|
dependent_startup_wait_for=rsyslogd:running
|
||||||
|
|
||||||
[program:telemetry]
|
[program:telemetry]
|
||||||
command=/usr/bin/telemetry.sh
|
command=/usr/bin/telemetry.sh
|
||||||
@ -32,6 +44,8 @@ autostart=false
|
|||||||
autorestart=false
|
autorestart=false
|
||||||
stdout_logfile=syslog
|
stdout_logfile=syslog
|
||||||
stderr_logfile=syslog
|
stderr_logfile=syslog
|
||||||
|
dependent_startup=true
|
||||||
|
dependent_startup_wait_for=start:exited
|
||||||
|
|
||||||
[program:dialout]
|
[program:dialout]
|
||||||
command=/usr/bin/dialout.sh
|
command=/usr/bin/dialout.sh
|
||||||
@ -40,3 +54,5 @@ autostart=false
|
|||||||
autorestart=false
|
autorestart=false
|
||||||
stdout_logfile=syslog
|
stdout_logfile=syslog
|
||||||
stderr_logfile=syslog
|
stderr_logfile=syslog
|
||||||
|
dependent_startup=true
|
||||||
|
dependent_startup_wait_for=telemetry:running
|
||||||
|
Loading…
Reference in New Issue
Block a user