Skip to content

Commit 3a8fd0a

Browse files
yaqiangzmssonicbld
authored andcommitted
[dhcp_relay] Increase wait time for default route check in dhcp_relay test (sonic-net#15976)
What is the motivation for this PR? There is flaky failure in this case because default route missing How did you do it? Increase wait time for it. Add log for triage How did you verify/test it? Run test
1 parent 6d7bd3c commit 3a8fd0a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/dhcp_relay/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def dut_dhcp_relay_data(duthosts, rand_one_dut_hostname, ptfhost, tbinfo):
146146
def validate_dut_routes_exist(duthosts, rand_one_dut_hostname, dut_dhcp_relay_data):
147147
"""Fixture to valid a route to each DHCP server exist
148148
"""
149-
py_assert(wait_until(120, 5, 0, check_routes_to_dhcp_server, duthosts[rand_one_dut_hostname],
149+
py_assert(wait_until(360, 5, 0, check_routes_to_dhcp_server, duthosts[rand_one_dut_hostname],
150150
dut_dhcp_relay_data),
151151
"Packets relayed to DHCP server should go through default route via upstream neighbor, but now it's" +
152152
" going through mgmt interface, which means device is in an unhealthy status")

tests/dhcp_relay/dhcp_relay_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
def check_routes_to_dhcp_server(duthost, dut_dhcp_relay_data):
1010
"""Validate there is route on DUT to each DHCP server
1111
"""
12+
output = duthost.shell("show ip bgp sum", module_ignore_errors=True)
13+
logger.info("bgp state: {}".format(output["stdout"]))
14+
output = duthost.shell("show int po", module_ignore_errors=True)
15+
logger.info("portchannel state: {}".format(output["stdout"]))
1216
default_gw_ip = dut_dhcp_relay_data[0]['default_gw_ip']
1317
dhcp_servers = set()
1418
for dhcp_relay in dut_dhcp_relay_data:

0 commit comments

Comments
 (0)