From be155e8ef7ae7356c66a26a29d659982b5d5ef42 Mon Sep 17 00:00:00 2001 From: Perumal Venkatesh Date: Tue, 24 Sep 2024 16:57:40 -0700 Subject: [PATCH 1/3] Increase wait time for modular chassis --- tests/tacacs/test_ro_disk.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/tacacs/test_ro_disk.py b/tests/tacacs/test_ro_disk.py index 7431e0e528..c795965bb0 100644 --- a/tests/tacacs/test_ro_disk.py +++ b/tests/tacacs/test_ro_disk.py @@ -101,7 +101,13 @@ def do_reboot(duthost, localhost, duthosts): def post_reboot_healthcheck(duthost, localhost, duthosts, wait_time): - localhost.wait_for(host=duthost.mgmt_ip, port=22, state="started", delay=10, timeout=300) + timeout=300 + if duthost.get_facts().get("modular_chassis"): + wait_time = max(wait_time, 900) + timeout = max(timeout, 600) + localhost.wait_for(host=duthost.mgmt_ip, port=22, state="started", delay=10, timeout=timeout) + else: + localhost.wait_for(host=duthost.mgmt_ip, port=22, state="started", delay=10, timeout=timeout) wait(wait_time, msg="Wait {} seconds for system to be stable.".format(wait_time)) if not wait_until(300, 20, 0, duthost.critical_services_fully_started): logger.error("Not all critical services fully started!") From c4e18f1489615ba98a02f1606325dfbdd267b748 Mon Sep 17 00:00:00 2001 From: Perumal Venkatesh Date: Tue, 24 Sep 2024 17:01:25 -0700 Subject: [PATCH 2/3] Increase wait time for modular chassis (Supervisor) --- tests/tacacs/test_ro_disk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tacacs/test_ro_disk.py b/tests/tacacs/test_ro_disk.py index c795965bb0..2be797d579 100644 --- a/tests/tacacs/test_ro_disk.py +++ b/tests/tacacs/test_ro_disk.py @@ -102,7 +102,7 @@ def do_reboot(duthost, localhost, duthosts): def post_reboot_healthcheck(duthost, localhost, duthosts, wait_time): timeout=300 - if duthost.get_facts().get("modular_chassis"): + if duthost.get_facts().get("modular_chassis") and duthost.is_supervisor_node(): wait_time = max(wait_time, 900) timeout = max(timeout, 600) localhost.wait_for(host=duthost.mgmt_ip, port=22, state="started", delay=10, timeout=timeout) From 2fa9eaa75772ea73d8f500a9ce051ea2e19425e1 Mon Sep 17 00:00:00 2001 From: Perumal Venkatesh Date: Tue, 24 Sep 2024 17:08:05 -0700 Subject: [PATCH 3/3] Fix flake8 issues --- tests/tacacs/test_ro_disk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tacacs/test_ro_disk.py b/tests/tacacs/test_ro_disk.py index 2be797d579..03d0eb47ab 100644 --- a/tests/tacacs/test_ro_disk.py +++ b/tests/tacacs/test_ro_disk.py @@ -101,7 +101,7 @@ def do_reboot(duthost, localhost, duthosts): def post_reboot_healthcheck(duthost, localhost, duthosts, wait_time): - timeout=300 + timeout = 300 if duthost.get_facts().get("modular_chassis") and duthost.is_supervisor_node(): wait_time = max(wait_time, 900) timeout = max(timeout, 600)