From eb93928f96691aa6c4e8b2cf25fabba702419fe3 Mon Sep 17 00:00:00 2001 From: wangshengjun Date: Fri, 9 Aug 2019 19:02:41 +0800 Subject: [PATCH 1/2] [dhcp_relay]the function of 'wait_until_iface_ready' called once for each interface.(#3316) Signed-off-by: wangshengjun --- dockers/docker-dhcp-relay/wait_for_intf.sh.j2 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dockers/docker-dhcp-relay/wait_for_intf.sh.j2 b/dockers/docker-dhcp-relay/wait_for_intf.sh.j2 index bf50abe4f053..fd7c3ff95bc0 100644 --- a/dockers/docker-dhcp-relay/wait_for_intf.sh.j2 +++ b/dockers/docker-dhcp-relay/wait_for_intf.sh.j2 @@ -29,12 +29,19 @@ function wait_until_iface_ready # Wait for all interfaces to be up and ready -{% for (name, prefix) in INTERFACE|pfx_filter %} +{% for name in PORT %} +{% if name in INTERFACE %} wait_until_iface_ready ${PORT_TABLE_PREFIX} {{ name }} +{% endif %} {% endfor %} -{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %} +{% for name in VLAN %} +{% if name in VLAN_INTERFACE %} wait_until_iface_ready ${VLAN_TABLE_PREFIX} {{ name }} +{% endif %} {% endfor %} -{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %} +{% for name in PORTCHANNEL %} +{% if name in PORTCHANNEL_INTERFACE %} wait_until_iface_ready ${LAG_TABLE_PREFIX} {{ name }} +{% endif %} {% endfor %} + From 653ed9050fe3d2a23a9fc9c8e4729ce2d42d5ac1 Mon Sep 17 00:00:00 2001 From: wangshengjun Date: Sat, 10 Aug 2019 20:05:02 +0800 Subject: [PATCH 2/2] [dhcp_relay] fix the compile error for the issue '#3316', change the sample_output file of 'wait_for_intf.sh'. #3316 Signed-off-by: wangshengjun --- src/sonic-config-engine/tests/sample_output/wait_for_intf.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/sonic-config-engine/tests/sample_output/wait_for_intf.sh b/src/sonic-config-engine/tests/sample_output/wait_for_intf.sh index 383f7cb389e9..5f50106ff556 100644 --- a/src/sonic-config-engine/tests/sample_output/wait_for_intf.sh +++ b/src/sonic-config-engine/tests/sample_output/wait_for_intf.sh @@ -31,11 +31,7 @@ function wait_until_iface_ready # Wait for all interfaces to be up and ready wait_until_iface_ready ${VLAN_TABLE_PREFIX} Vlan1000 wait_until_iface_ready ${LAG_TABLE_PREFIX} PortChannel01 -wait_until_iface_ready ${LAG_TABLE_PREFIX} PortChannel01 -wait_until_iface_ready ${LAG_TABLE_PREFIX} PortChannel02 wait_until_iface_ready ${LAG_TABLE_PREFIX} PortChannel02 wait_until_iface_ready ${LAG_TABLE_PREFIX} PortChannel03 -wait_until_iface_ready ${LAG_TABLE_PREFIX} PortChannel03 -wait_until_iface_ready ${LAG_TABLE_PREFIX} PortChannel04 wait_until_iface_ready ${LAG_TABLE_PREFIX} PortChannel04