Fix unexpected exception in wait_for while executing reboot#16085
Merged
yejianquan merged 2 commits intosonic-net:masterfrom Dec 18, 2024
Merged
Fix unexpected exception in wait_for while executing reboot#16085yejianquan merged 2 commits intosonic-net:masterfrom
yejianquan merged 2 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
We can set the default value to 0. The code will set the value if |
Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
Collaborator
|
/azp run |
Contributor
Author
|
|
Azure Pipelines successfully started running 1 pipeline(s). |
auspham
approved these changes
Dec 18, 2024
Contributor
auspham
left a comment
There was a problem hiding this comment.
Thanks for taking care of this
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
@yejianquan could you please help merge it? |
Collaborator
merged, thanks for the quick fix! |
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>
Collaborator
|
Cherry-pick PR to 202405: #16138 |
8 tasks
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>
Collaborator
|
hi @ZhaohuiS seems can't start the auto cherry pick, could you manually file one to 202411? |
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
Fixes # (issue)
platform_tests/test_reload_config.py::test_reload_configuration_checksfailed due to the following error:TypeError: unsupported type for timedelta seconds component: NoneTypein the following error test log:
That because
timeoutparameter is set to None forlocalhost.wait_forfunction.The change was made in #15951
Type of change
Back port request
Approach
What is the motivation for this PR?
Fix the
TypeError: unsupported type for timedelta seconds component: NoneTypefor 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_checkson non T2 testbed.Any platform specific information?
T0/T1/M0/Mx
Supported testbed topology if it's a new test case?
Documentation