Skip to content

Commit

Permalink
Make swssconfig status FATAL when it fails (#1009)
Browse files Browse the repository at this point in the history
* Make supervisor controlled one-shot program autorestart 0 time, so the status will become FATAL instead of EXITED if failure happens

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>

* Make swssconfig.sh strictly exit on any failure

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>

* Tune startretries, tested in supervisor 3.3.2-1

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
  • Loading branch information
qiluo-msft authored and lguohan committed Oct 4, 2017
1 parent 646e836 commit 554114c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dockers/docker-orchagent/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ stderr_logfile=syslog
command=/usr/bin/swssconfig.sh
priority=7
autostart=false
autorestart=false
autorestart=unexpected
startretries=0
stdout_logfile=syslog
stderr_logfile=syslog

Expand Down
2 changes: 2 additions & 0 deletions dockers/docker-orchagent/swssconfig.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -e

function config_acl {
if [ -f "/etc/sonic/acl.json" ]; then
mkdir -p /etc/swss/config.d/acl
Expand Down

0 comments on commit 554114c

Please sign in to comment.