diff --git a/dockers/docker-dhcp-relay/start.sh b/dockers/docker-dhcp-relay/start.sh index cb563eb003c3..87a9e5711f2f 100755 --- a/dockers/docker-dhcp-relay/start.sh +++ b/dockers/docker-dhcp-relay/start.sh @@ -10,8 +10,8 @@ then ${CTR_SCRIPT} -f dhcp_relay -o ${RUNTIME_OWNER} -v ${IMAGE_VERSION} fi -# If our supervisor config has entries in the "isc-dhcp-relay" group... -if [ $(supervisorctl status | grep -c "^isc-dhcp-relay:") -gt 0 ]; then +# If our supervisor config has entries in the "dhcp-relay" group... +if [ $(supervisorctl status | grep -c "^dhcp-relay:") -gt 0 ]; then # Wait for all interfaces to come up and be assigned IPv4 addresses before # starting the DHCP relay agent(s). If an interface the relay should listen # on is down, the relay agent will not start. If an interface the relay diff --git a/dockers/docker-dhcp-relay/wait_for_intf.sh.j2 b/dockers/docker-dhcp-relay/wait_for_intf.sh.j2 index 568f128b3772..b224a697b5ba 100644 --- a/dockers/docker-dhcp-relay/wait_for_intf.sh.j2 +++ b/dockers/docker-dhcp-relay/wait_for_intf.sh.j2 @@ -38,3 +38,8 @@ wait_until_iface_ready {{ name }} {{ prefix }} wait_until_iface_ready {{ name }} {{ prefix }} {% endif %} {% endfor %} + +# Wait 10 seconds for the rest of interfaces to get added/populated. +# dhcrelay listens on each of the interfaces (in addition to the port +# channels and vlan interfaces) +sleep 10 diff --git a/src/sonic-config-engine/tests/sample_output/py2/wait_for_intf.sh b/src/sonic-config-engine/tests/sample_output/py2/wait_for_intf.sh index 4852f6167bad..8ba15b1c8355 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/wait_for_intf.sh +++ b/src/sonic-config-engine/tests/sample_output/py2/wait_for_intf.sh @@ -30,3 +30,7 @@ wait_until_iface_ready PortChannel03 10.0.0.60/31 wait_until_iface_ready PortChannel04 10.0.0.62/31 wait_until_iface_ready PortChannel01 10.0.0.56/31 +# Wait 10 seconds for the rest of interfaces to get added/populated. +# dhcrelay listens on each of the interfaces (in addition to the port +# channels and vlan interfaces) +sleep 10 diff --git a/src/sonic-config-engine/tests/sample_output/py3/wait_for_intf.sh b/src/sonic-config-engine/tests/sample_output/py3/wait_for_intf.sh index 68a3a830f068..6e5012d5939c 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/wait_for_intf.sh +++ b/src/sonic-config-engine/tests/sample_output/py3/wait_for_intf.sh @@ -30,3 +30,7 @@ wait_until_iface_ready PortChannel02 10.0.0.58/31 wait_until_iface_ready PortChannel03 10.0.0.60/31 wait_until_iface_ready PortChannel04 10.0.0.62/31 +# Wait 10 seconds for the rest of interfaces to get added/populated. +# dhcrelay listens on each of the interfaces (in addition to the port +# channels and vlan interfaces) +sleep 10