Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Reboot shouldn't always force min 900s wait on T2 devices #14840

Open
Javier-Tan opened this issue Oct 4, 2024 · 2 comments · May be fixed by #14849
Open

[Bug]: Reboot shouldn't always force min 900s wait on T2 devices #14840

Javier-Tan opened this issue Oct 4, 2024 · 2 comments · May be fixed by #14849
Assignees

Comments

@Javier-Tan
Copy link
Contributor

Issue Description

Currently, using reboot function from tests/common/reboot.py forces wait variable to be at least 900s when called from T2 device, through:

        if duthost.get_facts().get("modular_chassis"):
            wait = max(wait, 900)
            timeout = max(timeout, 600)

This may cause tests that rely on a wait being shorter than 900s to fail. e.g. bgp/test_startup_tsa_tsb_service.py calls reboot(suphost, localhost, wait=240) and must check for a certain condition before 900s has passed due to a timer STARTUP_TSB_TIMER=900 or it will fail.

Proposed solution:
Add safe reboot as a flag

        if duthost.get_facts().get("modular_chassis") and safe_reboot:
            wait = max(wait, 900)
            timeout = max(timeout, 600)

This change may cause changes in other tests calling reboot e.g.:

  • A cold reboot when safe reboot is off, default values would be wait = 120; timer = 300 defined from reboot_ctrl_dict[REBOOT_TYPE_COLD], wait value would be respected if defined in reboot function.

Results you see

Reboot wait variable must be at least 900s for reboot from chassis DUTs.

Results you expected to see

Reboot wait variable should be respected if defined without safe_reboot flag.

Is it platform specific

generic

Relevant log output

N/A

Output of show version

Version agnostic issue

Attach files (if any)

N/A

@Javier-Tan Javier-Tan self-assigned this Oct 4, 2024
@Javier-Tan
Copy link
Contributor Author

@arlakshm for vis

@Javier-Tan
Copy link
Contributor Author

Javier-Tan commented Oct 5, 2024

The effective priority to define wait and timeout variables would now be:
900, 600 for T2 DUT & safe reboot > values defined in inv > explicitly defined wait and timeout > default values in reboot_ctrl_dict

I'm unsure if we want to set a default of wait = 900 and timeout = 600 if wait and timeout are not explicitly defined for a T2 DUT?

@Javier-Tan Javier-Tan linked a pull request Oct 5, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant