Skip to content

Adjust t2 timing in tests/platform_tests/test_reload_config.py#15951

Merged
yejianquan merged 1 commit intosonic-net:masterfrom
auspham:austinpham/30457598-fix-flaky-test-reload-config
Dec 11, 2024
Merged

Adjust t2 timing in tests/platform_tests/test_reload_config.py#15951
yejianquan merged 1 commit intosonic-net:masterfrom
auspham:austinpham/30457598-fix-flaky-test-reload-config

Conversation

@auspham
Copy link
Copy Markdown
Contributor

@auspham auspham commented Dec 9, 2024

Description of PR

Summary:
Fixes # (issue) 3045798

The decision was to enable this test gap in #13476 however we mentioned that we need to increase the time.

By default, the reboot time will be decided from constant variable reboot_ctrl_dict which will set the REBOOT_TYPE_COLD = 300

https://github.com/sonic-net/sonic-mgmt/blob/master/tests/common/reboot.py#L133

For T2, this time is not sufficient enough and lead to failure. We will adjust the time accordingly.

This PR will fix that

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

How did you do it?

Enable plt_reboot_ctrl_overwrite if platform is T2

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@auspham auspham requested a review from prgeor as a code owner December 9, 2024 04:55
@auspham auspham requested review from cyw233 and yejianquan December 9, 2024 04:56
@auspham auspham assigned auspham and unassigned yejianquan and cyw233 Dec 9, 2024
@auspham auspham requested a review from augusdn December 9, 2024 04:56
@yejianquan yejianquan marked this pull request as draft December 9, 2024 07:58
Signed-off-by: Austin Pham <austinpham@microsoft.com>
@auspham auspham force-pushed the austinpham/30457598-fix-flaky-test-reload-config branch from 5322159 to ec18ca4 Compare December 10, 2024 09:32
@auspham auspham changed the title Toggle plt_reboot_ctrl_overwrite to increase timeout for t2 in tests/platform_tests/test_reload_config.py Adjust t2 timing in tests/platform_tests/test_reload_config.py Dec 10, 2024
@auspham auspham marked this pull request as ready for review December 10, 2024 21:57
Copy link
Copy Markdown
Collaborator

@yejianquan yejianquan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yejianquan yejianquan merged commit 12caaa8 into sonic-net:master Dec 11, 2024
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Dec 11, 2024
…onic-net#15951)

Description of PR
Summary:
Fixes # (issue) 3045798

The decision was to enable this test gap in sonic-net#13476 however we mentioned that we need to increase the time.

By default, the reboot time will be decided from constant variable reboot_ctrl_dict which will set the REBOOT_TYPE_COLD = 300

https://github.com/sonic-net/sonic-mgmt/blob/master/tests/common/reboot.py#L133

For T2, this time is not sufficient enough and lead to failure. We will adjust the time accordingly.

This PR will fix that

Approach
What is the motivation for this PR?
How did you do it?
Enable plt_reboot_ctrl_overwrite if platform is T2

Signed-off-by: Austin Pham <austinpham@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202405: #15993

mssonicbld pushed a commit that referenced this pull request Dec 11, 2024
…15951)

Description of PR
Summary:
Fixes # (issue) 3045798

The decision was to enable this test gap in #13476 however we mentioned that we need to increase the time.

By default, the reboot time will be decided from constant variable reboot_ctrl_dict which will set the REBOOT_TYPE_COLD = 300

https://github.com/sonic-net/sonic-mgmt/blob/master/tests/common/reboot.py#L133

For T2, this time is not sufficient enough and lead to failure. We will adjust the time accordingly.

This PR will fix that

Approach
What is the motivation for this PR?
How did you do it?
Enable plt_reboot_ctrl_overwrite if platform is T2

Signed-off-by: Austin Pham <austinpham@microsoft.com>
@bingwang-ms
Copy link
Copy Markdown
Collaborator

This PR causes regression on Non-chassis platform because timeout is set to None by default. The default value should be 0.

@auspham
Copy link
Copy Markdown
Contributor Author

auspham commented Dec 17, 2024

This PR causes regression on Non-chassis platform because timeout is set to None by default. The default value should be 0.

Thanks for pointing out, timeout should be set to 0 instead of None.

yejianquan pushed a commit that referenced this pull request Dec 18, 2024
Description of PR
Summary:
Fixes # (issue)
platform_tests/test_reload_config.py::test_reload_configuration_checks failed due to the following error:

TypeError: unsupported type for timedelta seconds component: NoneType

in the following error test log:

Traceback (most recent call last):
  File \"/tmp/.ansible-AzDevOps/ansible-tmp-1734119665.955616-147727-226449133302882/AnsiballZ_wait_for.py\", line 107, in <module>
    _ansiballz_main()
  File \"/tmp/.ansible-AzDevOps/ansible-tmp-1734119665.955616-147727-226449133302882/AnsiballZ_wait_for.py\", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File \"/tmp/.ansible-AzDevOps/ansible-tmp-1734119665.955616-147727-226449133302882/AnsiballZ_wait_for.py\", line 47, in invoke_module
    runpy.run_module(mod_name='ansible.modules.wait_for', init_globals=dict(_module_fqn='ansible.modules.wait_for', _modlib_path=modlib_path),
  File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code
    exec(code, run_globals)
  File \"/tmp/ansible_wait_for_payload_9brlx4xp/ansible_wait_for_payload.zip/ansible/modules/wait_for.py\", line 689, in <module>
  File \"/tmp/ansible_wait_for_payload_9brlx4xp/ansible_wait_for_payload.zip/ansible/modules/wait_for.py\", line 544, in main
TypeError: unsupported type for timedelta seconds component: NoneType
",
  "msg": "MODULE FAILURE
See stdout/stderr for the exact error",
That because timeout parameter is set to None for localhost.wait_for function.

The change was made in #15951

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 Test case(new/improvement)
Back port request
 202012
 202205
 202305
 202311
 202405
Approach
What is the motivation for this PR?
Fix the TypeError: unsupported type for timedelta seconds component: NoneType for localhost.wait_for.

How did you do it?
Don't pass in timeout if it's not module chassis

How did you verify/test it?
Run platform_tests/test_reload_config.py::test_reload_configuration_checks on non T2 testbed.

Any platform specific information?

Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Dec 18, 2024
…t#16085)

Description of PR
Summary:
Fixes # (issue)
platform_tests/test_reload_config.py::test_reload_configuration_checks failed due to the following error:

TypeError: unsupported type for timedelta seconds component: NoneType

in the following error test log:

Traceback (most recent call last):
  File \"/tmp/.ansible-AzDevOps/ansible-tmp-1734119665.955616-147727-226449133302882/AnsiballZ_wait_for.py\", line 107, in <module>
    _ansiballz_main()
  File \"/tmp/.ansible-AzDevOps/ansible-tmp-1734119665.955616-147727-226449133302882/AnsiballZ_wait_for.py\", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File \"/tmp/.ansible-AzDevOps/ansible-tmp-1734119665.955616-147727-226449133302882/AnsiballZ_wait_for.py\", line 47, in invoke_module
    runpy.run_module(mod_name='ansible.modules.wait_for', init_globals=dict(_module_fqn='ansible.modules.wait_for', _modlib_path=modlib_path),
  File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code
    exec(code, run_globals)
  File \"/tmp/ansible_wait_for_payload_9brlx4xp/ansible_wait_for_payload.zip/ansible/modules/wait_for.py\", line 689, in <module>
  File \"/tmp/ansible_wait_for_payload_9brlx4xp/ansible_wait_for_payload.zip/ansible/modules/wait_for.py\", line 544, in main
TypeError: unsupported type for timedelta seconds component: NoneType
",
  "msg": "MODULE FAILURE
See stdout/stderr for the exact error",
That because timeout parameter is set to None for localhost.wait_for function.

The change was made in sonic-net#15951

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 Test case(new/improvement)
Back port request
 202012
 202205
 202305
 202311
 202405
Approach
What is the motivation for this PR?
Fix the TypeError: unsupported type for timedelta seconds component: NoneType for localhost.wait_for.

How did you do it?
Don't pass in timeout if it's not module chassis

How did you verify/test it?
Run platform_tests/test_reload_config.py::test_reload_configuration_checks on non T2 testbed.

Any platform specific information?

Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
mssonicbld pushed a commit that referenced this pull request Dec 18, 2024
Description of PR
Summary:
Fixes # (issue)
platform_tests/test_reload_config.py::test_reload_configuration_checks failed due to the following error:

TypeError: unsupported type for timedelta seconds component: NoneType

in the following error test log:

Traceback (most recent call last):
  File \"/tmp/.ansible-AzDevOps/ansible-tmp-1734119665.955616-147727-226449133302882/AnsiballZ_wait_for.py\", line 107, in <module>
    _ansiballz_main()
  File \"/tmp/.ansible-AzDevOps/ansible-tmp-1734119665.955616-147727-226449133302882/AnsiballZ_wait_for.py\", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File \"/tmp/.ansible-AzDevOps/ansible-tmp-1734119665.955616-147727-226449133302882/AnsiballZ_wait_for.py\", line 47, in invoke_module
    runpy.run_module(mod_name='ansible.modules.wait_for', init_globals=dict(_module_fqn='ansible.modules.wait_for', _modlib_path=modlib_path),
  File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code
    exec(code, run_globals)
  File \"/tmp/ansible_wait_for_payload_9brlx4xp/ansible_wait_for_payload.zip/ansible/modules/wait_for.py\", line 689, in <module>
  File \"/tmp/ansible_wait_for_payload_9brlx4xp/ansible_wait_for_payload.zip/ansible/modules/wait_for.py\", line 544, in main
TypeError: unsupported type for timedelta seconds component: NoneType
",
  "msg": "MODULE FAILURE
See stdout/stderr for the exact error",
That because timeout parameter is set to None for localhost.wait_for function.

The change was made in #15951

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 Test case(new/improvement)
Back port request
 202012
 202205
 202305
 202311
 202405
Approach
What is the motivation for this PR?
Fix the TypeError: unsupported type for timedelta seconds component: NoneType for localhost.wait_for.

How did you do it?
Don't pass in timeout if it's not module chassis

How did you verify/test it?
Run platform_tests/test_reload_config.py::test_reload_configuration_checks on non T2 testbed.

Any platform specific information?

Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 2, 2025
…onic-net#15951)

Description of PR
Summary:
Fixes # (issue) 3045798

The decision was to enable this test gap in sonic-net#13476 however we mentioned that we need to increase the time.

By default, the reboot time will be decided from constant variable reboot_ctrl_dict which will set the REBOOT_TYPE_COLD = 300

https://github.com/sonic-net/sonic-mgmt/blob/master/tests/common/reboot.py#L133

For T2, this time is not sufficient enough and lead to failure. We will adjust the time accordingly.

This PR will fix that

Approach
What is the motivation for this PR?
How did you do it?
Enable plt_reboot_ctrl_overwrite if platform is T2

Signed-off-by: Austin Pham <austinpham@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202411: #16284

mssonicbld pushed a commit that referenced this pull request Jan 2, 2025
…15951)

Description of PR
Summary:
Fixes # (issue) 3045798

The decision was to enable this test gap in #13476 however we mentioned that we need to increase the time.

By default, the reboot time will be decided from constant variable reboot_ctrl_dict which will set the REBOOT_TYPE_COLD = 300

https://github.com/sonic-net/sonic-mgmt/blob/master/tests/common/reboot.py#L133

For T2, this time is not sufficient enough and lead to failure. We will adjust the time accordingly.

This PR will fix that

Approach
What is the motivation for this PR?
How did you do it?
Enable plt_reboot_ctrl_overwrite if platform is T2

Signed-off-by: Austin Pham <austinpham@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants