[docker-syncd-vs]: add support for vs syncd docker auto restart (#4344)

Signed-off-by: Guohan Lu <lguohan@gmail.com>
This commit is contained in:
lguohan 2020-03-31 15:00:48 -07:00 committed by GitHub
parent 7e7777e374
commit dca8a27719
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -24,6 +24,8 @@ debs/{{ deb }}{{' '}}
COPY ["start.sh", "/usr/bin/"] COPY ["start.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor/"]
## Clean up ## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y

View File

@ -0,0 +1 @@
syncd

View File

@ -3,6 +3,12 @@ logfile_maxbytes=1MB
logfile_backups=2 logfile_backups=2
nodaemon=true nodaemon=true
[eventlistener:supervisor-proc-exit-listener]
command=/usr/bin/supervisor-proc-exit-listener --container-name syncd
events=PROCESS_STATE_EXITED
autostart=true
autorestart=unexpected
[program:start.sh] [program:start.sh]
command=/usr/bin/start.sh command=/usr/bin/start.sh
priority=1 priority=1
@ -15,7 +21,7 @@ stderr_logfile=syslog
command=/usr/sbin/rsyslogd -n command=/usr/sbin/rsyslogd -n
priority=2 priority=2
autostart=false autostart=false
autorestart=false autorestart=unexpected
stdout_logfile=syslog stdout_logfile=syslog
stderr_logfile=syslog stderr_logfile=syslog