Skip to content

Commit

Permalink
[docker-syncd-vs]: add support for vs syncd docker auto restart (#4344)
Browse files Browse the repository at this point in the history
Signed-off-by: Guohan Lu <lguohan@gmail.com>
  • Loading branch information
lguohan authored Mar 31, 2020
1 parent 7e7777e commit dca8a27
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions platform/vs/docker-syncd-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ debs/{{ deb }}{{' '}}
COPY ["start.sh", "/usr/bin/"]

COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor/"]

## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
Expand Down
1 change: 1 addition & 0 deletions platform/vs/docker-syncd-vs/critical_processes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
syncd
8 changes: 7 additions & 1 deletion platform/vs/docker-syncd-vs/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ logfile_maxbytes=1MB
logfile_backups=2
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]
command=/usr/bin/start.sh
priority=1
Expand All @@ -15,7 +21,7 @@ stderr_logfile=syslog
command=/usr/sbin/rsyslogd -n
priority=2
autostart=false
autorestart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog

Expand Down

0 comments on commit dca8a27

Please sign in to comment.