Skip to content

Commit

Permalink
enable safe reboot for multidut snappi cases. (sonic-net#14882)
Browse files Browse the repository at this point in the history
Description of PR
Summary:
Current snappi multidut tests wait 15 minutes to finish a reboot as the default waiting time is 900 seconds for chassis.
However, when using safe reload, it will finish the reboot in 10 minutes. Also, existing non multidut test cases have changed to use safe reboot as well.
Therefore, setting multidut cases to use safe reboot.

Approach
What is the motivation for this PR?
reduce reboot time for multidut snappi cases.

How did you do it?
Use safe reboot.

How did you verify/test it?
Tested on lab devices.

co-authorized by: jianquanye@microsoft.com
  • Loading branch information
sdszhang authored Oct 9, 2024
1 parent f480bc8 commit 360da0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def test_pfc_pause_single_lossless_prio_reboot(snappi_api, # no

for duthost in [snappi_ports[0]['duthost'], snappi_ports[1]['duthost']]:
logger.info("Issuing a {} reboot on the dut {}".format(reboot_type, duthost.hostname))
reboot(duthost, localhost, reboot_type=reboot_type)
reboot(duthost, localhost, reboot_type=reboot_type, safe_reboot=True)
logger.info("Wait until the system is stable")
wait_until(180, 20, 0, duthost.critical_services_fully_started)

Expand Down Expand Up @@ -349,7 +349,7 @@ def test_pfc_pause_multi_lossless_prio_reboot(snappi_api, # noq

for duthost in [snappi_ports[0]['duthost'], snappi_ports[1]['duthost']]:
logger.info("Issuing a {} reboot on the dut {}".format(reboot_type, duthost.hostname))
reboot(duthost, localhost, reboot_type=reboot_type)
reboot(duthost, localhost, reboot_type=reboot_type, safe_reboot=True)
logger.info("Wait until the system is stable")
wait_until(180, 20, 0, duthost.critical_services_fully_started)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def test_pfc_pause_single_lossy_prio_reboot(snappi_api, # noqa: F811

for duthost in [snappi_ports[0]['duthost'], snappi_ports[1]['duthost']]:
logger.info("Issuing a {} reboot on the dut {}".format(reboot_type, duthost.hostname))
reboot(duthost, localhost, reboot_type=reboot_type)
reboot(duthost, localhost, reboot_type=reboot_type, safe_reboot=True)
logger.info("Wait until the system is stable")
wait_until(180, 20, 0, duthost.critical_services_fully_started)

Expand Down Expand Up @@ -340,7 +340,7 @@ def test_pfc_pause_multi_lossy_prio_reboot(snappi_api, # noqa: F811

for duthost in [snappi_ports[0]['duthost'], snappi_ports[1]['duthost']]:
logger.info("Issuing a {} reboot on the dut {}".format(reboot_type, duthost.hostname))
reboot(duthost, localhost, reboot_type=reboot_type)
reboot(duthost, localhost, reboot_type=reboot_type, safe_reboot=True)
logger.info("Wait until the system is stable")
wait_until(180, 20, 0, duthost.critical_services_fully_started)

Expand Down

0 comments on commit 360da0e

Please sign in to comment.