aa323e435e
Why I did it DHCPv6 Relay information will be stored in DHCP_RELAY table instead of VLAN table in the future. How I did it Change dhcp_relay docker files to parse through DHCP_RELAY to check for dhcpv6 status How to verify it Build dhcp_relay docker and check all dhcp_relay and dhcpmon are running properly Which release branch to backport (provide reason below if selected)
56 lines
1.6 KiB
Django/Jinja
56 lines
1.6 KiB
Django/Jinja
[supervisord]
|
|
logfile_maxbytes=1MB
|
|
logfile_backups=2
|
|
nodaemon=true
|
|
|
|
[program:start.sh]
|
|
command=/usr/bin/start.sh
|
|
priority=1
|
|
autostart=true
|
|
autorestart=false
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
|
|
[program:rsyslogd]
|
|
command=/usr/sbin/rsyslogd -n
|
|
priority=2
|
|
autostart=false
|
|
autorestart=false
|
|
stdout_logfile=syslog
|
|
stderr_logfile=syslog
|
|
|
|
{# If our configuration has VLANs... #}
|
|
{% if VLAN_INTERFACE %}
|
|
{# Count how many VLANs require a DHCP relay agent... #}
|
|
{% set ipv4_num_relays = { 'count': 0 } %}
|
|
{% set ipv6_num_relays = { 'count': 0 } %}
|
|
{% set d = namespace(vlan_list=[]) %}
|
|
{% for (name, prefix) in VLAN_INTERFACE %}
|
|
{% if name not in d.vlan_list %}
|
|
{% set d.vlan_list = d.vlan_list + [name] %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% set vlan_list = d.vlan_list %}
|
|
{# Count how many VLANs require a DHCP relay agent... #}
|
|
{% set num_relays = { 'count': 0 } %}
|
|
{% for vlan_name in vlan_list %}
|
|
{% if VLAN and vlan_name in VLAN and VLAN[vlan_name]['dhcp_servers'] %}
|
|
{% set _dummy = ipv4_num_relays.update({'count': ipv4_num_relays.count + 1}) %}
|
|
{% endif %}
|
|
{% if DHCP_RELAY and vlan_name in DHCP_RELAY and 'dhcpv6_servers' in DHCP_RELAY[vlan_name] %}
|
|
{% set _dummy = ipv6_num_relays.update({'count': ipv6_num_relays.count + 1}) %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{# If one or more of the VLANs require a DHCP relay agent... #}
|
|
{% if ipv4_num_relays.count > 0 or ipv6_num_relays.count > 0 %}
|
|
{% include 'dhcp-relay.programs.j2' %}
|
|
|
|
{% set relay_for_ipv4 = { 'flag': False } %}
|
|
{% set relay_for_ipv6 = { 'flag': False } %}
|
|
|
|
{% include 'dhcpv4-relay.agents.j2' %}
|
|
{% include 'dhcpv6-relay.agents.j2' %}
|
|
|
|
{% include 'dhcpv6-relay.monitors.j2' %}
|
|
{% endif %}
|
|
{% endif %} |