2017-10-05 01:35:43 -05:00
|
|
|
[supervisord]
|
|
|
|
logfile_maxbytes=1MB
|
|
|
|
logfile_backups=2
|
|
|
|
nodaemon=true
|
|
|
|
|
2020-05-16 10:27:31 -05:00
|
|
|
[eventlistener:dependent-startup]
|
|
|
|
command=python -m supervisord_dependent_startup
|
|
|
|
autostart=true
|
|
|
|
autorestart=unexpected
|
|
|
|
startretries=0
|
|
|
|
exitcodes=0,3
|
|
|
|
events=PROCESS_STATE
|
[201911][dockers][supervisor] Increase event buffer size for process exit listener (#7106)
Backport of https://github.com/Azure/sonic-buildimage/pull/7083 to the 201911 branch.
#### Why I did it
To prevent error [messages](https://dev.azure.com/mssonic/build/_build/results?buildId=2254&view=logs&j=9a13fbcd-e92d-583c-2f89-d81f90cac1fd&t=739db6ba-1b35-5485-5697-de102068d650&l=802) like the following from being logged:
```
Mar 17 02:33:48.523153 vlab-01 INFO swss#supervisord 2021-03-17 02:33:48,518 ERRO pool supervisor-proc-exit-listener event buffer overflowed, discarding event 46
```
This is basically an addendum to https://github.com/Azure/sonic-buildimage/pull/5247, which increased the event buffer size for dependent-startup. While supervisor-proc-exit-listener doesn't subscribe to as many events as dependent-startup, there is still a chance some containers (like swss, as in the example above) have enough processes running to cause an overflow of the default buffer size of 10.
This is especially important for preventing erroneous log_analyzer failures in the sonic-mgmt repo regression tests, which have started occasionally causing PR check builds to fail. Example [here](https://dev.azure.com/mssonic/build/_build/results?buildId=2254&view=logs&j=9a13fbcd-e92d-583c-2f89-d81f90cac1fd&t=739db6ba-1b35-5485-5697-de102068d650&l=802).
I set all supervisor-proc-exit-listener event buffer sizes to 1024, and also updated all dependent-startup event buffer sizes to 1024, as well, to keep things simple, unified, and allow headroom so that we will not need to adjust these values frequently, if at all.
2021-03-29 12:07:43 -05:00
|
|
|
buffer_size=1024
|
2020-05-16 10:27:31 -05:00
|
|
|
|
2019-11-05 20:32:14 -06:00
|
|
|
[eventlistener:supervisor-proc-exit-listener]
|
2020-02-07 14:34:07 -06:00
|
|
|
command=/usr/bin/supervisor-proc-exit-listener --container-name dhcp_relay
|
2019-11-05 20:32:14 -06:00
|
|
|
events=PROCESS_STATE_EXITED
|
|
|
|
autostart=true
|
|
|
|
autorestart=unexpected
|
[201911][dockers][supervisor] Increase event buffer size for process exit listener (#7106)
Backport of https://github.com/Azure/sonic-buildimage/pull/7083 to the 201911 branch.
#### Why I did it
To prevent error [messages](https://dev.azure.com/mssonic/build/_build/results?buildId=2254&view=logs&j=9a13fbcd-e92d-583c-2f89-d81f90cac1fd&t=739db6ba-1b35-5485-5697-de102068d650&l=802) like the following from being logged:
```
Mar 17 02:33:48.523153 vlab-01 INFO swss#supervisord 2021-03-17 02:33:48,518 ERRO pool supervisor-proc-exit-listener event buffer overflowed, discarding event 46
```
This is basically an addendum to https://github.com/Azure/sonic-buildimage/pull/5247, which increased the event buffer size for dependent-startup. While supervisor-proc-exit-listener doesn't subscribe to as many events as dependent-startup, there is still a chance some containers (like swss, as in the example above) have enough processes running to cause an overflow of the default buffer size of 10.
This is especially important for preventing erroneous log_analyzer failures in the sonic-mgmt repo regression tests, which have started occasionally causing PR check builds to fail. Example [here](https://dev.azure.com/mssonic/build/_build/results?buildId=2254&view=logs&j=9a13fbcd-e92d-583c-2f89-d81f90cac1fd&t=739db6ba-1b35-5485-5697-de102068d650&l=802).
I set all supervisor-proc-exit-listener event buffer sizes to 1024, and also updated all dependent-startup event buffer sizes to 1024, as well, to keep things simple, unified, and allow headroom so that we will not need to adjust these values frequently, if at all.
2021-03-29 12:07:43 -05:00
|
|
|
buffer_size=1024
|
2019-11-05 20:32:14 -06:00
|
|
|
|
2020-05-16 10:27:31 -05:00
|
|
|
[program:rsyslogd]
|
|
|
|
command=/usr/sbin/rsyslogd -n -iNONE
|
2017-10-05 01:35:43 -05:00
|
|
|
priority=1
|
2020-05-16 10:27:31 -05:00
|
|
|
autostart=false
|
2017-10-05 01:35:43 -05:00
|
|
|
autorestart=false
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
2020-05-16 10:27:31 -05:00
|
|
|
dependent_startup=true
|
2017-10-05 01:35:43 -05:00
|
|
|
|
2020-05-16 10:27:31 -05:00
|
|
|
[program:start]
|
|
|
|
command=/usr/bin/start.sh
|
2017-10-05 01:35:43 -05:00
|
|
|
priority=2
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
2020-05-16 10:27:31 -05:00
|
|
|
startsecs=0
|
2017-10-05 01:35:43 -05:00
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
2020-05-16 10:27:31 -05:00
|
|
|
dependent_startup=true
|
|
|
|
dependent_startup_wait_for=rsyslogd:running
|
2017-10-05 01:35:43 -05:00
|
|
|
|
|
|
|
{# If our configuration has VLANs... #}
|
2021-01-25 12:48:48 -06:00
|
|
|
{% if VLAN_INTERFACE %}
|
2017-10-05 01:35:43 -05:00
|
|
|
{# Count how many VLANs require a DHCP relay agent... #}
|
|
|
|
{% set num_relays = { 'count': 0 } %}
|
2021-01-25 12:48:48 -06:00
|
|
|
{% for vlan_name in VLAN_INTERFACE %}
|
2021-03-15 16:43:50 -05:00
|
|
|
{% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
|
2017-10-05 01:35:43 -05:00
|
|
|
{% set _dummy = num_relays.update({'count': num_relays.count + 1}) %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{# If one or more of the VLANs require a DHCP relay agent... #}
|
|
|
|
{% if num_relays.count > 0 %}
|
|
|
|
[group:isc-dhcp-relay]
|
|
|
|
programs=
|
2019-06-03 16:26:45 -05:00
|
|
|
{%- set add_preceding_comma = { 'flag': False } %}
|
2021-01-25 12:48:48 -06:00
|
|
|
{% for vlan_name in VLAN_INTERFACE %}
|
2021-03-15 16:43:50 -05:00
|
|
|
{% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
|
2019-06-03 16:26:45 -05:00
|
|
|
{% if add_preceding_comma.flag %},{% endif %}
|
|
|
|
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
|
2017-10-05 01:35:43 -05:00
|
|
|
isc-dhcp-relay-{{ vlan_name }}
|
|
|
|
{%- endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
|
|
{# Create a program entry for each DHCP relay agent instance #}
|
2019-09-06 14:01:08 -05:00
|
|
|
{% set relay_for_ipv4 = { 'flag': False } %}
|
2021-01-25 12:48:48 -06:00
|
|
|
{% for vlan_name in VLAN_INTERFACE %}
|
2021-03-15 16:43:50 -05:00
|
|
|
{% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
|
2019-09-06 14:01:08 -05:00
|
|
|
{% for dhcp_server in VLAN[vlan_name]['dhcp_servers'] %}
|
|
|
|
{% if dhcp_server | ipv4 %}
|
|
|
|
{% set _dummy = relay_for_ipv4.update({'flag': True}) %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% if relay_for_ipv4.flag %}
|
|
|
|
{% set _dummy = relay_for_ipv4.update({'flag': False}) %}
|
2017-10-05 01:35:43 -05:00
|
|
|
[program:isc-dhcp-relay-{{ vlan_name }}]
|
2019-06-03 16:26:45 -05:00
|
|
|
{# We treat this VLAN as a downstream interface (-id), as we only want to listen for requests #}
|
|
|
|
command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id {{ vlan_name }}
|
2021-03-15 11:21:32 -05:00
|
|
|
{#- si option to use intf addr in relay #}
|
|
|
|
{% if DEVICE_METADATA['localhost']['deployment_id'] == '8' %} -si{% endif -%}
|
2019-06-03 16:26:45 -05:00
|
|
|
{#- We treat all other interfaces as upstream interfaces (-iu), as we only want to listen for replies #}
|
2019-06-10 16:02:55 -05:00
|
|
|
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
|
2019-06-03 16:26:45 -05:00
|
|
|
{% if prefix | ipv4 and name != vlan_name %} -iu {{ name }}{% endif -%}
|
|
|
|
{% endfor %}
|
2019-06-10 16:02:55 -05:00
|
|
|
{% for (name, prefix) in INTERFACE|pfx_filter %}
|
2019-06-03 16:26:45 -05:00
|
|
|
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
|
|
|
{% endfor %}
|
2019-06-10 16:02:55 -05:00
|
|
|
{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %}
|
2019-06-03 16:26:45 -05:00
|
|
|
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
|
|
|
{% endfor %}
|
2019-09-06 14:01:08 -05:00
|
|
|
{% for dhcp_server in VLAN[vlan_name]['dhcp_servers'] %}
|
|
|
|
{%- if dhcp_server | ipv4 %} {{ dhcp_server }}{% endif -%}
|
|
|
|
{% endfor %}
|
2017-10-05 01:35:43 -05:00
|
|
|
|
|
|
|
priority=3
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
2020-05-16 10:27:31 -05:00
|
|
|
dependent_startup=true
|
|
|
|
dependent_startup_wait_for=start:exited
|
2017-10-05 01:35:43 -05:00
|
|
|
|
2019-09-06 14:01:08 -05:00
|
|
|
{% endif %}
|
2017-10-05 01:35:43 -05:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2020-01-07 19:48:03 -06:00
|
|
|
|
|
|
|
[group:dhcpmon]
|
|
|
|
programs=
|
|
|
|
{%- set add_preceding_comma = { 'flag': False } %}
|
2021-01-25 12:48:48 -06:00
|
|
|
{% for vlan_name in VLAN_INTERFACE %}
|
2021-03-15 16:43:50 -05:00
|
|
|
{% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
|
2020-01-07 19:48:03 -06:00
|
|
|
{% if add_preceding_comma.flag %},{% endif %}
|
|
|
|
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
|
|
|
|
dhcpmon-{{ vlan_name }}
|
|
|
|
{%- endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
|
|
{# Create a program entry for each DHCP MONitor instance #}
|
|
|
|
{% set relay_for_ipv4 = { 'flag': False } %}
|
2021-01-25 12:48:48 -06:00
|
|
|
{% for vlan_name in VLAN_INTERFACE %}
|
2021-03-15 16:43:50 -05:00
|
|
|
{% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
|
2020-01-07 19:48:03 -06:00
|
|
|
{% for dhcp_server in VLAN[vlan_name]['dhcp_servers'] %}
|
|
|
|
{% if dhcp_server | ipv4 %}
|
|
|
|
{% set _dummy = relay_for_ipv4.update({'flag': True}) %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% if relay_for_ipv4.flag %}
|
|
|
|
{% set _dummy = relay_for_ipv4.update({'flag': False}) %}
|
|
|
|
[program:dhcpmon-{{ vlan_name }}]
|
|
|
|
{# We treat this VLAN as a downstream interface (-id), as we only want to listen for requests #}
|
|
|
|
command=/usr/sbin/dhcpmon -id {{ vlan_name }}
|
|
|
|
{#- We treat all other interfaces as upstream interfaces (-iu), as we only want to listen for replies #}
|
|
|
|
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
|
|
|
|
{% if prefix | ipv4 and name != vlan_name %} -iu {{ name }}{% endif -%}
|
|
|
|
{% endfor %}
|
|
|
|
{% for (name, prefix) in INTERFACE|pfx_filter %}
|
|
|
|
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
|
|
|
{% endfor %}
|
|
|
|
{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %}
|
|
|
|
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
|
|
|
{% endfor %}
|
2020-09-09 20:37:01 -05:00
|
|
|
{% if MGMT_INTERFACE %}
|
|
|
|
{% for (name, prefix) in MGMT_INTERFACE|pfx_filter %}
|
2020-09-15 17:27:36 -05:00
|
|
|
{% if prefix | ipv4 %} -im {{ name }}{% endif -%}
|
2020-09-09 20:37:01 -05:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2020-01-07 19:48:03 -06:00
|
|
|
|
|
|
|
priority=4
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
2020-05-16 10:27:31 -05:00
|
|
|
dependent_startup=true
|
|
|
|
dependent_startup_wait_for=isc-dhcp-relay-{{ vlan_name }}:running
|
2020-01-07 19:48:03 -06:00
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
2017-10-05 01:35:43 -05:00
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|