Skip to content

Commit 7a21cab

Browse files
Fix docker auto restart issue (#21377)
Why I did it if critical process crashes or killed, bmp docker container will not be auto-restarted. How I did it /usr/bin/supervisor-proc-exit-listener takes in charge of critical process monitor and event publish, thus it should be autorestar-ted in any case, otherwise there might be issue if supervisor-proc-exit-listener crashes, or in some test cases like "docker exec bmp kill -SIGKILL -1" critical processes may not work correctly in some race condition (depends on whether supervisor-proc-exit-listener is the last one to be killed) When a container receives the SIGKILL signal to terminate its processes, the order in which the processes are actually terminated can depend on the scheduling and resource availability within the container. If supervisor-proc-exit-listener is killed first before critical process, container auto restart will not be launched as expected.
1 parent bb90401 commit 7a21cab

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

dockers/docker-sonic-bmp/supervisord.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ buffer_size=1024
1616
command=/usr/bin/supervisor-proc-exit-listener --container-name bmp
1717
events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING
1818
autostart=true
19-
autorestart=false
19+
autorestart=unexpected
2020
buffer_size=1024
2121

2222
[program:rsyslogd]

dockers/docker-sonic-gnmi/supervisord.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ buffer_size=1024
1616
command=/usr/bin/supervisor-proc-exit-listener --container-name gnmi
1717
events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING
1818
autostart=true
19-
autorestart=false
19+
autorestart=unexpected
2020
buffer_size=1024
2121

2222
[program:rsyslogd]

dockers/docker-sonic-restapi/supervisord.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ buffer_size=1024
1616
command=/usr/bin/supervisor-proc-exit-listener --container-name restapi
1717
events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING
1818
autostart=true
19-
autorestart=false
19+
autorestart=unexpected
2020
buffer_size=1024
2121

2222
[program:rsyslogd]

dockers/docker-sonic-telemetry/supervisord.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ buffer_size=1024
1616
command=/usr/bin/supervisor-proc-exit-listener --container-name telemetry
1717
events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING
1818
autostart=true
19-
autorestart=false
19+
autorestart=unexpected
2020
buffer_size=1024
2121

2222
[program:rsyslogd]

0 commit comments

Comments
 (0)