Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
ipmitool \
ndisc6 \
makedumpfile \
conntrack
conntrack \
jq


if [[ $CONFIGURED_ARCH == amd64 ]]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"skip_ledd": true,
"skip_fancontrol": true
"skip_fancontrol": true,
"delay_xcvrd": true
}

2 changes: 1 addition & 1 deletion dockers/docker-dhcp-relay/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN apt-get clean -y && \
rm -rf /debs

COPY ["docker_init.sh", "start.sh", "/usr/bin/"]
COPY ["docker-dhcp-relay.supervisord.conf.j2", "wait_for_intf.sh.j2", "/usr/share/sonic/templates/"]
COPY ["docker-dhcp-relay.supervisord.conf.j2", "port-name-alias-map.txt.j2", "wait_for_intf.sh.j2", "/usr/share/sonic/templates/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

Expand Down
20 changes: 13 additions & 7 deletions dockers/docker-dhcp-relay/docker_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@

# Generate supervisord config file
mkdir -p /etc/supervisor/conf.d/
sonic-cfggen -d -t /usr/share/sonic/templates/docker-dhcp-relay.supervisord.conf.j2 > /etc/supervisor/conf.d/docker-dhcp-relay.supervisord.conf

# Generate the script that waits for all interfaces to come up and make it executable
sonic-cfggen -d -t /usr/share/sonic/templates/wait_for_intf.sh.j2 > /usr/bin/wait_for_intf.sh
chmod +x /usr/bin/wait_for_intf.sh
# Generate the following files from templates:
# 1. supervisord configuration
# 2. wait_for_intf.sh, which waits for all interfaces to come up
# 3. port-to-alias name map
CFGGEN_PARAMS=" \
-d \
-t /usr/share/sonic/templates/docker-dhcp-relay.supervisord.conf.j2,/etc/supervisor/conf.d/docker-dhcp-relay.supervisord.conf \
-t /usr/share/sonic/templates/wait_for_intf.sh.j2,/usr/bin/wait_for_intf.sh \
-t /usr/share/sonic/templates/port-name-alias-map.txt.j2,/tmp/port-name-alias-map.txt \
"
sonic-cfggen $CFGGEN_PARAMS

# Generate port name-alias map for isc-dhcp-relay to parse. Each line contains one
# name-alias pair of the form "<name> <alias>"
sonic-cfggen -d --var-json "PORT" | python -c "import sys, json, os; [sys.stdout.write('%s %s\n' % (k, v['alias'] if 'alias' in v else k)) for (k, v) in json.load(sys.stdin).iteritems()]" > /tmp/port-name-alias-map.txt
# Make the script that waits for all interfaces to come up executable
chmod +x /usr/bin/wait_for_intf.sh

# The docker container should start this script as PID 1, so now that supervisord is
# properly configured, we exec supervisord so that it runs as PID 1 for the
Expand Down
5 changes: 5 additions & 0 deletions dockers/docker-dhcp-relay/port-name-alias-map.txt.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{# Generate port name-alias map for isc-dhcp-relay to parse. Each line contains one #}
{# name-alias pair of the form "<name> <alias>" #}
{% for port, config in PORT.items() %}
{{- port }} {% if "alias" in config %}{{ config["alias"] }}{% else %}{{ port }}{% endif %} {{- "\n" -}}
{% endfor -%}
1 change: 1 addition & 0 deletions dockers/docker-fpm-frr/frr/frr_vars.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ DEVICE_METADATA["localhost"]["docker_routing_config_mode"] }}
23 changes: 15 additions & 8 deletions dockers/docker-fpm-frr/start.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
#!/usr/bin/env bash

mkdir -p /etc/frr

CONFIG_TYPE=`sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["docker_routing_config_mode"]'`
mkdir -p /etc/supervisor/conf.d

CFGGEN_PARAMS=" \
-d \
-y /etc/sonic/constants.yml \
-t /usr/share/sonic/templates/supervisord/frr_vars.j2 \
-t /usr/share/sonic/templates/supervisord/supervisord.conf.j2,/etc/supervisor/conf.d/supervisord.conf \
-t /usr/share/sonic/templates/bgpd/bgpd.conf.j2,/etc/frr/bgpd.conf \
-t /usr/share/sonic/templates/zebra/zebra.conf.j2,/etc/frr/zebra.conf \
-t /usr/share/sonic/templates/staticd/staticd.conf.j2,/etc/frr/staticd.conf \
-t /usr/share/sonic/templates/frr.conf.j2,/etc/frr/frr.conf \
-t /usr/share/sonic/templates/isolate.j2,/usr/sbin/bgp-isolate \
-t /usr/share/sonic/templates/unisolate.j2,/usr/sbin/bgp-unisolate \
"
CONFIG_TYPE=$(sonic-cfggen $CFGGEN_PARAMS)

update_default_gw()
{
Expand Down Expand Up @@ -35,24 +48,18 @@ if [[ ! -z "$NAMESPACE_ID" ]]; then
fi

if [ -z "$CONFIG_TYPE" ] || [ "$CONFIG_TYPE" == "separated" ]; then
sonic-cfggen -d -t /usr/share/sonic/templates/bgpd/bgpd.conf.j2 -y /etc/sonic/constants.yml > /etc/frr/bgpd.conf
sonic-cfggen -d -t /usr/share/sonic/templates/zebra/zebra.conf.j2 > /etc/frr/zebra.conf
sonic-cfggen -d -t /usr/share/sonic/templates/staticd/staticd.conf.j2 > /etc/frr/staticd.conf
echo "no service integrated-vtysh-config" > /etc/frr/vtysh.conf
rm -f /etc/frr/frr.conf
elif [ "$CONFIG_TYPE" == "unified" ]; then
sonic-cfggen -d -y /etc/sonic/constants.yml -t /usr/share/sonic/templates/frr.conf.j2 >/etc/frr/frr.conf
echo "service integrated-vtysh-config" > /etc/frr/vtysh.conf
rm -f /etc/frr/bgpd.conf /etc/frr/zebra.conf /etc/frr/staticd.conf
fi

chown -R frr:frr /etc/frr/

sonic-cfggen -d -t /usr/share/sonic/templates/isolate.j2 > /usr/sbin/bgp-isolate
chown root:root /usr/sbin/bgp-isolate
chmod 0755 /usr/sbin/bgp-isolate

sonic-cfggen -d -t /usr/share/sonic/templates/unisolate.j2 > /usr/sbin/bgp-unisolate
chown root:root /usr/sbin/bgp-unisolate
chmod 0755 /usr/sbin/bgp-unisolate

Expand Down
13 changes: 9 additions & 4 deletions dockers/docker-fpm-gobgp/start.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
#!/usr/bin/env bash

mkdir -p /etc/quagga
sonic-cfggen -d -t /usr/share/sonic/templates/gobgpd.conf.j2 > /etc/gobgp/gobgpd.conf
sonic-cfggen -d -t /usr/share/sonic/templates/zebra.conf.j2 > /etc/quagga/zebra.conf

sonic-cfggen -d -t /usr/share/sonic/templates/isolate.j2 > /usr/sbin/bgp-isolate
CFGGEN_PARAMS=" \
-d \
-t /usr/share/sonic/templates/gobgpd.conf.j2,/etc/gobgp/gobgpd.conf \
-t /usr/share/sonic/templates/zebra.conf.j2,/etc/quagga/zebra.conf \
-t /usr/share/sonic/templates/isolate.j2,/usr/sbin/bgp-isolate \
-t /usr/share/sonic/templates/unisolate.j2,/usr/sbin/bgp-unisolate \
"
sonic-cfggen $CFGGEN_PARAMS

chown root:root /usr/sbin/bgp-isolate
chmod 0755 /usr/sbin/bgp-isolate

sonic-cfggen -d -t /usr/share/sonic/templates/unisolate.j2 > /usr/sbin/bgp-unisolate
chown root:root /usr/sbin/bgp-unisolate
chmod 0755 /usr/sbin/bgp-unisolate

Expand Down
13 changes: 9 additions & 4 deletions dockers/docker-fpm-quagga/start.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
#!/usr/bin/env bash

mkdir -p /etc/quagga
sonic-cfggen -d -y /etc/sonic/constants.yml -t /usr/share/sonic/templates/bgpd.conf.j2 > /etc/quagga/bgpd.conf

sonic-cfggen -d -t /usr/share/sonic/templates/zebra.conf.j2 > /etc/quagga/zebra.conf
CFGGEN_PARAMS=" \
-d \
-y /etc/sonic/constants.yml \
-t /usr/share/sonic/templates/bgpd.conf.j2,/etc/quagga/bgpd.conf \
-t /usr/share/sonic/templates/zebra.conf.j2,/etc/quagga/zebra.conf \
-t /usr/share/sonic/templates/isolate.j2,/usr/sbin/bgp-isolate \
-t /usr/share/sonic/templates/unisolate.j2,/usr/sbin/bgp-unisolate \
"
sonic-cfggen $CFGGEN_PARAMS

sonic-cfggen -d -t /usr/share/sonic/templates/isolate.j2 > /usr/sbin/bgp-isolate
chown root:root /usr/sbin/bgp-isolate
chmod 0755 /usr/sbin/bgp-isolate

sonic-cfggen -d -t /usr/share/sonic/templates/unisolate.j2 > /usr/sbin/bgp-unisolate
chown root:root /usr/sbin/bgp-unisolate
chmod 0755 /usr/sbin/bgp-unisolate

Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-orchagent/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RUN apt-get clean -y && \
rm -rf /debs

COPY ["files/arp_update", "/usr/bin"]
COPY ["arp_update.conf", "/usr/share/sonic/templates/"]
COPY ["arp_update.conf", "files/arp_update_vars.j2", "/usr/share/sonic/templates/"]
COPY ["enable_counters.py", "/usr/bin"]
COPY ["docker-init.sh", "orchagent.sh", "swssconfig.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
Expand Down
15 changes: 10 additions & 5 deletions dockers/docker-orchagent/docker-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@

mkdir -p /etc/swss/config.d/

sonic-cfggen -d -y /etc/sonic/sonic_version.yml -t /usr/share/sonic/templates/switch.json.j2 > /etc/swss/config.d/switch.json
sonic-cfggen -d -t /usr/share/sonic/templates/ipinip.json.j2 > /etc/swss/config.d/ipinip.json
sonic-cfggen -d -t /usr/share/sonic/templates/ports.json.j2 > /etc/swss/config.d/ports.json
sonic-cfggen -d -t /usr/share/sonic/templates/copp.json.j2 > /etc/swss/config.d/00-copp.config.json
CFGGEN_PARAMS=" \
-d \
-y /etc/sonic/constants.yml \
-t /usr/share/sonic/templates/switch.json.j2,/etc/swss/config.d/switch.json \
-t /usr/share/sonic/templates/ipinip.json.j2,/etc/swss/config.d/ipinip.json \
-t /usr/share/sonic/templates/ports.json.j2,/etc/swss/config.d/ports.json \
-t /usr/share/sonic/templates/copp.json.j2,/etc/swss/config.d/00-copp.config.json \
-t /usr/share/sonic/templates/vlan_vars.j2 \
"
VLAN=$(sonic-cfggen $CFGGEN_PARAMS)

# Executed HWSKU specific initialization tasks.
if [ -x /usr/share/sonic/hwsku/hwsku-init ]; then
/usr/share/sonic/hwsku/hwsku-init
fi

# Start arp_update when VLAN exists
VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'`
if [ "$VLAN" != "" ]; then
cp /usr/share/sonic/templates/arp_update.conf /etc/supervisor/conf.d/
fi
Expand Down
1 change: 1 addition & 0 deletions dockers/docker-orchagent/vlan_vars.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{%- if VLAN -%}{{- VLAN.keys() | join(' ') -}}{%- endif -%}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ dependent_startup_wait_for=start:exited

{% if not skip_xcvrd %}
[program:xcvrd]
{% if delay_xcvrd %}
command=bash -c "sleep 30 && /usr/bin/xcvrd"
{% else %}
command=/usr/bin/xcvrd
{% endif %}
priority=6
autostart=false
autorestart=false
Expand Down
16 changes: 10 additions & 6 deletions dockers/docker-router-advertiser/docker-init.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#!/usr/bin/env bash

mkdir -p /etc/supervisor/conf.d
sonic-cfggen -d -t /usr/share/sonic/templates/docker-router-advertiser.supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf

# Generate /etc/radvd.conf config file
sonic-cfggen -d -t /usr/share/sonic/templates/radvd.conf.j2 > /etc/radvd.conf
# Generate supervisord router advertiser config, /etc/radvd.conf config file, and
# the script that waits for pertinent interfaces to come up and make it executable
CFGGEN_PARAMS=" \
-d \
-t /usr/share/sonic/templates/docker-router-advertiser.supervisord.conf.j2,/etc/supervisor/conf.d/supervisord.conf \
-t /usr/share/sonic/templates/radvd.conf.j2,/etc/radvd.conf \
-t /usr/share/sonic/templates/wait_for_intf.sh.j2,/usr/bin/wait_for_intf.sh \
"
sonic-cfggen $CFGGEN_PARAMS

# Generate the script that waits for pertinent interfaces to come up and make it executable
sonic-cfggen -d -t /usr/share/sonic/templates/wait_for_link.sh.j2 > /usr/bin/wait_for_link.sh
chmod +x /usr/bin/wait_for_link.sh
chmod +x /usr/bin/wait_for_intf.sh

exec /usr/bin/supervisord
14 changes: 10 additions & 4 deletions dockers/docker-snmp-sv2/start.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#!/usr/bin/env bash

mkdir -p /etc/ssw
sonic-cfggen -d -y /etc/sonic/sonic_version.yml -t /usr/share/sonic/templates/sysDescription.j2 > /etc/ssw/sysDescription
mkdir -p /etc/ssw /etc/snmp

mkdir -p /etc/snmp
sonic-cfggen -d -y /etc/sonic/snmp.yml -t /usr/share/sonic/templates/snmpd.conf.j2 > /etc/snmp/snmpd.conf
SONIC_CFGGEN_ARGS=" \
-d \
-y /etc/sonic/sonic_version.yml \
-t /usr/share/sonic/templates/sysDescription.j2,/etc/ssw/sysDescription \
-y /etc/sonic/snmp.yml \
-t /usr/share/sonic/templates/snmpd.conf.j2,/etc/snmp/snmpd.conf \
"

sonic-cfggen $SONIC_CFGGEN_ARGS

mkdir -p /var/sonic
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
1 change: 1 addition & 0 deletions dockers/docker-sonic-mgmt-framework/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ debs/{{ deb }}{{' '}}
{%- endfor %}

COPY ["start.sh", "rest-server.sh", "/usr/bin/"]
COPY ["mgmt_vars.j2", "/usr/share/sonic/templates/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]

RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
Expand Down
4 changes: 4 additions & 0 deletions dockers/docker-sonic-mgmt-framework/mgmt_vars.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"rest_server": {% if REST_SERVER is defined and "default" in RESET_SERVER.keys() %}{{ REST_SERVER['default'] }}{% else %}""{% endif %},
"x509" : {% if "x509" in DEVICE_METADATA.keys() %}{{ DEVICE_METADATA["x509"] }}{% else %}""{% endif %}
}
47 changes: 29 additions & 18 deletions dockers/docker-sonic-mgmt-framework/rest-server.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
#!/usr/bin/env bash

# Startup script for SONiC Management REST Server
EXIT_MGMT_VARS_FILE_NOT_FOUND=1
MGMT_VARS_FILE=/usr/share/sonic/templates/mgmt_vars.j2

SERVER_PORT=
LOG_LEVEL=
CLIENT_AUTH=
SERVER_CRT=
SERVER_KEY=
CA_CERT=

# Read basic server settings from REST_SERVER|default entry
HAS_REST_CONFIG=$(sonic-cfggen -d -v "1 if REST_SERVER and REST_SERVER['default']")
if [ "$HAS_REST_CONFIG" == "1" ]; then
SERVER_PORT=$(sonic-cfggen -d -v "REST_SERVER['default']['port']")
CLIENT_AUTH=$(sonic-cfggen -d -v "REST_SERVER['default']['client_auth']")
LOG_LEVEL=$(sonic-cfggen -d -v "REST_SERVER['default']['log_level']")
if [ ! -f "$MGMT_VARS_FILE" ]; then
echo "Mgmt vars template file not found"
exit $EXIT_MGMT_VARS_FILE_NOT_FOUND
fi

# Read basic server settings from mgmt vars entries
MGMT_VARS=$(sonic-cfggen -d -t $MGMT_VARS_FILE)
MGMT_VARS=${MGMT_VARS//[\']/\"}

REST_SERVER=$(echo $MGMT_VARS | jq -r '.rest_server')

if [ -n "$REST_SERVER" ]; then
SERVER_PORT=$(echo $REST_SERVER | jq -r '.port')
CLIENT_AUTH=$(echo $REST_SERVER | jq -r '.client_auth')
LOG_LEVEL=$(echo $REST_SERVER | jq -r '.log_level')

SERVER_CRT=$(echo $REST_SERVER | jq -r '.server_crt')
SERVER_KEY=$(echo $REST_SERVER | jq -r '.server_key')
CA_CRT=$(echo $REST_SERVER | jq -r '.ca_crt')
fi

if [[ -z $SERVER_CRT ]] && [[ -z $SERVER_KEY ]] && [[ -z $CA_CRT ]]; then
X509=$(echo $MGMT_VARS | jq -r '.x509')
fi

# Read certificate file paths from DEVICE_METADATA|x509 entry.
HAS_X509_CONFIG=$(sonic-cfggen -d -v "1 if DEVICE_METADATA and DEVICE_METADATA['x509']")
if [ "$HAS_X509_CONFIG" == "1" ]; then
SERVER_CRT=$(sonic-cfggen -d -v "DEVICE_METADATA['x509']['server_crt']")
SERVER_KEY=$(sonic-cfggen -d -v "DEVICE_METADATA['x509']['server_key']")
CA_CRT=$(sonic-cfggen -d -v "DEVICE_METADATA['x509']['ca_crt']")
if [ -n "$X509" ]; then
SERVER_CRT=$(echo $X509 | jq -r '.server_crt')
SERVER_KEY=$(echo $X509 | jq -r '.server_key')
CA_CRT=$(echo $X509 | jq -r '.ca_crt')
fi

# Create temporary server certificate if they not configured in ConfigDB
Expand Down
5 changes: 5 additions & 0 deletions files/build_templates/arp_update_vars.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"interface": "{% for (name, prefix) in INTERFACE|pfx_filter %}{% if prefix|ipv6 %}{{ name }} {% endif %}{% endfor %}",
"pc_interface" : "{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %}{% if prefix|ipv6 %}{{ name }} {% endif %}{% endfor %}",
"vlan" : "{% if VLAN %}{{ VLAN.keys() | join(' ') }}{% endif %}"
}
12 changes: 8 additions & 4 deletions files/image_config/interfaces/interfaces-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ else
echo "{ \"ZTP_DHCP_DISABLED\" : \"true\" }" > /tmp/ztp_input.json
fi

# Create /e/n/i file for existing and active interfaces
sonic-cfggen -d -j /tmp/ztp_input.json -t /usr/share/sonic/templates/interfaces.j2 > /etc/network/interfaces
# Create /e/n/i file for existing and active interfaces, dhcp6 sytcl.conf and dhclient.conf
CFGGEN_PARAMS=" \
-d -j /tmp/ztp_input.json \
-t /usr/share/sonic/templates/interfaces.j2,/etc/network/interfaces \
-t /usr/share/sonic/templates/90-dhcp6-systcl.conf.j2,/etc/sysctl.d/90-dhcp6-systcl.conf \
-t /usr/share/sonic/templates/dhclient.conf.j2,/etc/dhcp/dhclient.conf \
"
sonic-cfggen $CFGGEN_PARAMS

[ -f /var/run/dhclient.eth0.pid ] && kill `cat /var/run/dhclient.eth0.pid` && rm -f /var/run/dhclient.eth0.pid
[ -f /var/run/dhclient6.eth0.pid ] && kill `cat /var/run/dhclient6.eth0.pid` && rm -f /var/run/dhclient6.eth0.pid
Expand All @@ -28,11 +34,9 @@ for intf_pid in $(ls -1 /var/run/dhclient*.Ethernet*.pid 2> /dev/null); do
[ -f ${intf_pid} ] && kill `cat ${intf_pid}` && rm -f ${intf_pid}
done

sonic-cfggen -d -j /tmp/ztp_input.json -t /usr/share/sonic/templates/90-dhcp6-systcl.conf.j2 > /etc/sysctl.d/90-dhcp6-systcl.conf
# Read sysctl conf files again
sysctl -p /etc/sysctl.d/90-dhcp6-systcl.conf

sonic-cfggen -d -j /tmp/ztp_input.json -t /usr/share/sonic/templates/dhclient.conf.j2 > /etc/dhcp/dhclient.conf
systemctl restart networking

# Clean-up created files
Expand Down
11 changes: 6 additions & 5 deletions files/scripts/arp_update
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
# Send gratuitous ARP/NDP requests to VLAN member neighbors to refresh
# the ipv4/ipv6 neighbors state.

ARP_UPDATE_VARS_FILE="/usr/share/sonic/templates/arp_update_vars.j2"

while /bin/true; do
# find L3 interfaces which are UP, send ipv6 multicast pings
echo "{% for (name, prefix) in INTERFACE|pfx_filter %} {{name}} {% endfor %}" > /tmp/intf_tmp.j2
INTERFACE=`sonic-cfggen -d -t /tmp/intf_tmp.j2`
echo "{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %} {{name}} {% endfor %}" > /tmp/pc_intf_tmp.j2
PC_INTERFACE=`sonic-cfggen -d -t /tmp/pc_intf_tmp.j2`
ARP_UPDATE_VARS=$(sonic-cfggen -d -t ${ARP_UPDATE_VARS_FILE})
INTERFACE=$(echo $ARP_UPDATE_VARS | jq -r '.interface')
PC_INTERFACE=$(echo $ARP_UPDATE_VARS | jq -r '.pc_interface')

ALL_INTERFACE="$INTERFACE $PC_INTERFACE"
for intf in $ALL_INTERFACE; do
Expand All @@ -23,7 +24,7 @@ while /bin/true; do
fi
done

VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'`
VLAN=$(echo $ARP_UPDATE_VARS | jq -r '.vlan')
for vlan in $VLAN; do
# generate a list of arping commands:
# arping -q -w 0 -c 1 -i <VLAN interface> <IP 1>;
Expand Down
Loading