File tree Expand file tree Collapse file tree 5 files changed +16
-1
lines changed Expand file tree Collapse file tree 5 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ RUN apt-get -y purge \
84
84
COPY ["start.sh", "/usr/bin/"]
85
85
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
86
86
COPY ["*.j2", "/usr/share/sonic/templates/"]
87
+ COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
88
+ COPY ["critical_processes", "/etc/supervisor"]
87
89
88
90
# Although exposing ports is not needed for host net mode, keep it for possible bridge mode
89
91
EXPOSE 161/udp 162/udp
Original file line number Diff line number Diff line change
1
+ snmpd
2
+ snmp-subagent
Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ logfile_maxbytes=1MB
3
3
logfile_backups=2
4
4
nodaemon=true
5
5
6
+ [eventlistener:supervisor-proc-exit-listener]
7
+ command=/usr/bin/supervisor-proc-exit-listener
8
+ events=PROCESS_STATE_EXITED
9
+ autostart=true
10
+ autorestart=unexpected
11
+
6
12
[program:start.sh]
7
13
command=/usr/bin/start.sh
8
14
priority=1
@@ -15,7 +21,7 @@ stderr_logfile=syslog
15
21
command=/usr/sbin/rsyslogd -n
16
22
priority=2
17
23
autostart=false
18
- autorestart=false
24
+ autorestart=unexpected
19
25
stdout_logfile=syslog
20
26
stderr_logfile=syslog
21
27
Original file line number Diff line number Diff line change @@ -4,11 +4,15 @@ Requires=updategraph.service
4
4
Requisite=swss.service
5
5
After=updategraph.service swss.service
6
6
Before=ntp-config.service
7
+ StartLimitIntervalSec=1200
8
+ StartLimitBurst=3
7
9
8
10
[Service]
9
11
ExecStartPre=/usr/bin/{{docker_container_name}}.sh start
10
12
ExecStart=/usr/bin/{{docker_container_name}}.sh wait
11
13
ExecStop=/usr/bin/{{docker_container_name}}.sh stop
14
+ Restart=always
15
+ RestartSec=30
12
16
13
17
[Install]
14
18
WantedBy=multi-user.target swss.service
Original file line number Diff line number Diff line change @@ -30,3 +30,4 @@ $(DOCKER_SNMP_SV2)_RUN_OPT += --net=host --privileged -t
30
30
$(DOCKER_SNMP_SV2)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
31
31
# mount Arista platform python libraries to support corresponding platforms SNMP power status query
32
32
$(DOCKER_SNMP_SV2)_RUN_OPT += -v /usr/lib/python3/dist-packages/arista:/usr/lib/python3/dist-packages/arista:ro
33
+ $(DOCKER_SNMP_SV2)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT )
You can’t perform that action at this time.
0 commit comments