2019-05-09 01:00:49 -05:00
|
|
|
[supervisord]
|
|
|
|
logfile_maxbytes=1MB
|
|
|
|
logfile_backups=2
|
|
|
|
nodaemon=true
|
|
|
|
|
2020-05-14 16:58:43 -05:00
|
|
|
[eventlistener:dependent-startup]
|
2020-11-20 01:41:32 -06:00
|
|
|
command=python3 -m supervisord_dependent_startup
|
2020-05-14 16:58:43 -05:00
|
|
|
autostart=true
|
|
|
|
autorestart=unexpected
|
|
|
|
startretries=0
|
|
|
|
exitcodes=0,3
|
|
|
|
events=PROCESS_STATE
|
[dockers][supervisor] Increase event buffer size for dependent-startup (#5247)
When stopping the swss, pmon or bgp containers, log messages like the following can be seen:
```
Aug 23 22:50:43.789760 sonic-dut INFO swss#supervisord 2020-08-23 22:50:10,061 ERRO pool dependent-startup event buffer overflowed, discarding event 34
Aug 23 22:50:43.789760 sonic-dut INFO swss#supervisord 2020-08-23 22:50:10,063 ERRO pool dependent-startup event buffer overflowed, discarding event 35
Aug 23 22:50:43.789760 sonic-dut INFO swss#supervisord 2020-08-23 22:50:10,064 ERRO pool dependent-startup event buffer overflowed, discarding event 36
Aug 23 22:50:43.789760 sonic-dut INFO swss#supervisord 2020-08-23 22:50:10,066 ERRO pool dependent-startup event buffer overflowed, discarding event 37
```
This is due to the number of programs in the container managed by supervisor, all generating events at the same time. The default event queue buffer size in supervisor is 10. This patch increases that value in all containers in order to eliminate these errors. As more programs are added to the containers, we may need to further adjust these values. I increased all buffer sizes to 25 except for containers with more programs or templated supervisor.conf files which allow for a variable number of programs. In these cases I increased the buffer size to 50. One final exception is the swss container, where the buffer fills up to ~50, so I increased this buffer to 100.
Resolves https://github.com/Azure/sonic-buildimage/issues/5241
2020-09-09 01:36:38 -05:00
|
|
|
buffer_size=50
|
2020-05-14 16:58:43 -05:00
|
|
|
|
2020-03-03 18:50:32 -06:00
|
|
|
[eventlistener:supervisor-proc-exit-listener]
|
|
|
|
command=/usr/bin/supervisor-proc-exit-listener --container-name bgp
|
[supervisord] Monitoring the critical processes with supervisord. (#6242)
- Why I did it
Initially, we used Monit to monitor critical processes in each container. If one of critical processes was not running
or crashed due to some reasons, then Monit will write an alerting message into syslog periodically. If we add a new process
in a container, the corresponding Monti configuration file will also need to update. It is a little hard for maintenance.
Currently we employed event listener of Supervisod to do this monitoring. Since processes in each container are managed by
Supervisord, we can only focus on the logic of monitoring.
- How I did it
We borrowed the event listener of Supervisord to monitor critical processes in containers. The event listener will take
following steps if it was notified one of critical processes exited unexpectedly:
The event listener will first check whether the auto-restart mechanism was enabled for this container or not. If auto-restart mechanism was enabled, event listener will kill the Supervisord process, which should cause the container to exit and subsequently get restarted.
If auto-restart mechanism was not enabled for this contianer, the event listener will enter a loop which will first sleep 1 minute and then check whether the process is running. If yes, the event listener exits. If no, an alerting message will be written into syslog.
- How to verify it
First, we need checked whether the auto-restart mechanism of a container was enabled or not by running the command show feature status. If enabled, one critical process should be selected and killed manually, then we need check whether the container will be restarted or not.
Second, we can disable the auto-restart mechanism if it was enabled at step 1 by running the commnad sudo config feature autorestart <container_name> disabled. Then one critical process should be selected and killed. After that, we will see the alerting message which will appear in the syslog every 1 minute.
- Which release branch to backport (provide reason below if selected)
201811
201911
[x ] 202006
2021-01-21 14:57:49 -06:00
|
|
|
events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING
|
2020-03-03 18:50:32 -06:00
|
|
|
autostart=true
|
|
|
|
autorestart=unexpected
|
|
|
|
|
2019-05-09 01:00:49 -05:00
|
|
|
[program:rsyslogd]
|
2020-05-14 16:58:43 -05:00
|
|
|
command=/usr/sbin/rsyslogd -n -iNONE
|
|
|
|
priority=1
|
2019-05-09 01:00:49 -05:00
|
|
|
autostart=false
|
2020-03-03 18:50:32 -06:00
|
|
|
autorestart=unexpected
|
2019-05-09 01:00:49 -05:00
|
|
|
startsecs=0
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
2020-05-14 16:58:43 -05:00
|
|
|
dependent_startup=true
|
2019-05-09 01:00:49 -05:00
|
|
|
|
|
|
|
[program:zebra]
|
2019-06-19 03:24:42 -05:00
|
|
|
command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M fpm -M snmp
|
2019-05-09 01:00:49 -05:00
|
|
|
priority=4
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
startsecs=0
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
2020-05-14 16:58:43 -05:00
|
|
|
dependent_startup=true
|
|
|
|
dependent_startup_wait_for=rsyslogd:running
|
2019-05-09 01:00:49 -05:00
|
|
|
|
2019-05-16 12:59:12 -05:00
|
|
|
[program:staticd]
|
|
|
|
command=/usr/lib/frr/staticd -A 127.0.0.1
|
|
|
|
priority=4
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
startsecs=0
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
2020-05-14 16:58:43 -05:00
|
|
|
dependent_startup=true
|
2020-07-25 05:48:47 -05:00
|
|
|
dependent_startup_wait_for=zebra:running
|
2019-05-16 12:59:12 -05:00
|
|
|
|
2021-01-24 19:57:03 -06:00
|
|
|
{% if DEVICE_METADATA.localhost.frr_mgmt_framework_config is defined and DEVICE_METADATA.localhost.frr_mgmt_framework_config == "true" %}
|
|
|
|
[program:bfdd]
|
|
|
|
command=/usr/lib/frr/bfdd -A 127.0.0.1
|
|
|
|
priority=4
|
|
|
|
stopsignal=KILL
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
startsecs=0
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
|
|
|
dependent_startup=true
|
|
|
|
dependent_startup_wait_for=zebra:running
|
|
|
|
{% endif %}
|
|
|
|
|
2019-05-09 01:00:49 -05:00
|
|
|
[program:bgpd]
|
2021-01-19 02:23:36 -06:00
|
|
|
command=/usr/bin/bgpd.sh -A 127.0.0.1 -M snmp
|
2019-05-09 01:00:49 -05:00
|
|
|
priority=5
|
|
|
|
stopsignal=KILL
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
startsecs=0
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
2020-05-14 16:58:43 -05:00
|
|
|
dependent_startup=true
|
2020-07-25 05:48:47 -05:00
|
|
|
dependent_startup_wait_for=zebra:running
|
2019-05-09 01:00:49 -05:00
|
|
|
|
2021-01-24 19:57:03 -06:00
|
|
|
{% if DEVICE_METADATA.localhost.frr_mgmt_framework_config is defined and DEVICE_METADATA.localhost.frr_mgmt_framework_config == "true" %}
|
|
|
|
[program:ospfd]
|
|
|
|
command=/usr/lib/frr/ospfd -A 127.0.0.1 -M snmp
|
|
|
|
priority=5
|
|
|
|
stopsignal=KILL
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
startsecs=0
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
|
|
|
dependent_startup=true
|
|
|
|
dependent_startup_wait_for=zebra:running
|
|
|
|
|
|
|
|
[program:pimd]
|
|
|
|
command=/usr/lib/frr/pimd -A 127.0.0.1
|
|
|
|
priority=5
|
|
|
|
stopsignal=KILL
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
startsecs=0
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
|
|
|
dependent_startup=true
|
|
|
|
dependent_startup_wait_for=zebra:running
|
|
|
|
{% endif %}
|
|
|
|
|
2020-05-14 16:58:43 -05:00
|
|
|
[program:fpmsyncd]
|
|
|
|
command=fpmsyncd
|
2019-05-09 01:00:49 -05:00
|
|
|
priority=6
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
startsecs=0
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
2020-05-14 16:58:43 -05:00
|
|
|
dependent_startup=true
|
|
|
|
dependent_startup_wait_for=bgpd:running
|
2019-05-09 01:00:49 -05:00
|
|
|
|
2021-01-24 19:57:03 -06:00
|
|
|
{% if DEVICE_METADATA.localhost.frr_mgmt_framework_config is defined and DEVICE_METADATA.localhost.frr_mgmt_framework_config == "true" %}
|
|
|
|
[program:frrcfgd]
|
|
|
|
command=/usr/local/bin/frrcfgd
|
|
|
|
{% else %}
|
2020-05-14 16:58:43 -05:00
|
|
|
[program:bgpcfgd]
|
2020-06-20 23:01:24 -05:00
|
|
|
command=/usr/local/bin/bgpcfgd
|
2021-01-24 19:57:03 -06:00
|
|
|
{% endif %}
|
2020-05-14 16:58:43 -05:00
|
|
|
priority=6
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
startsecs=0
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
|
|
|
dependent_startup=true
|
|
|
|
dependent_startup_wait_for=bgpd:running
|
|
|
|
|
2020-09-20 16:32:09 -05:00
|
|
|
[program:bgpmon]
|
|
|
|
command=/usr/local/bin/bgpmon
|
|
|
|
priority=6
|
|
|
|
autostart=false
|
2020-09-25 12:25:11 -05:00
|
|
|
autorestart=true
|
2020-09-20 16:32:09 -05:00
|
|
|
startsecs=0
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
|
|
|
dependent_startup=true
|
|
|
|
dependent_startup_wait_for=bgpd:running
|
|
|
|
|
2020-05-14 16:58:43 -05:00
|
|
|
{% if DEVICE_METADATA.localhost.docker_routing_config_mode is defined and DEVICE_METADATA.localhost.docker_routing_config_mode == "unified" %}
|
|
|
|
[program:vtysh_b]
|
|
|
|
command=/usr/bin/vtysh -b
|
2019-05-09 01:00:49 -05:00
|
|
|
priority=6
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
startsecs=0
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
2020-05-14 16:58:43 -05:00
|
|
|
dependent_startup=true
|
2020-07-25 05:48:47 -05:00
|
|
|
dependent_startup_wait_for=bgpd:running
|
2020-05-14 16:58:43 -05:00
|
|
|
{% endif %}
|
2019-11-13 16:10:11 -06:00
|
|
|
|
2020-05-14 16:58:43 -05:00
|
|
|
{% if WARM_RESTART is defined and WARM_RESTART.bgp is defined and WARM_RESTART.bgp.bgp_eoiu is defined and WARM_RESTART.bgp.bgp_eoiu == "true" %}
|
2019-11-13 16:10:11 -06:00
|
|
|
[program:bgp_eoiu_marker]
|
|
|
|
command=/usr/bin/bgp_eoiu_marker.py
|
|
|
|
priority=7
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
startsecs=0
|
|
|
|
startretries=0
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
2020-05-14 16:58:43 -05:00
|
|
|
dependent_startup=true
|
2020-07-25 05:48:47 -05:00
|
|
|
dependent_startup_wait_for=bgpd:running
|
2020-05-14 16:58:43 -05:00
|
|
|
{% endif %}
|