-
Notifications
You must be signed in to change notification settings - Fork 684
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
Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take 45 seconds. #12914
Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take 45 seconds. #12914
Conversation
@@ -64,7 +64,7 @@ def hash_and_timestamp_changed(duthost, file): | |||
latest_timestamp = get_interface_reload_timestamp(duthost) | |||
return latest_hash != original_hash and latest_timestamp != last_timestamp | |||
|
|||
exist = wait_until(10, 1, 0, hash_and_timestamp_changed, duthost, file) | |||
exist = wait_until(60, 1, 0, hash_and_timestamp_changed, duthost, file) | |||
pytest_assert(exist, "File {} does not change after 10 seconds.".format(file)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
is it a typo "405 seconds"? #Closed |
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
After forced mgmt route change, hostcfgd will trigger 'interfaces-config' service to update /etc/network/interfaces. |
Fixed, typo. |
…atus with systemctl take 45 seconds. (sonic-net#12914) Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take too much time. #### Why I did it Check interfaces-config status with systemctl some times take 45 seconds, however the wait timeout is 10 seconds, which cause test case break: 13/05/2024 23:01:03 base._run L0071 DEBUG | /var/src/sonic-mgmt_vms21-t0-2700_646f1402735219c3e5444094/tests/common/devices/multi_asic.py::_run_on_asics#128: [] AnsibleModule::command, args=["sudo systemctl show --no-pager interfaces-config -p ExecMainExitTimestamp --value"], kwargs={} 13/05/2024 23:01:45 base._run L0108 DEBUG | /var/src/sonic-mgmt_vms21-t0-2700_646f1402735219c3e5444094/tests/common/devices/multi_asic.py::_run_on_asics#128: [] AnsibleModule::command Result => {"changed": true, "stdout": "", "stderr": "", "rc": 0, "cmd": ["sudo", "systemctl", "show", "--no-pager", "interfaces-config", "-p", "ExecMainExitTimestamp", "--value"], "start": "2024-05-13 23:01:00.605392", "end": "2024-05-13 23:01:00.682419", "delta": "0:00:00.077027", "msg": "", "invocation": {"module_args": {"_raw_params": "sudo systemctl show --no-pager interfaces-config -p ExecMainExitTimestamp --value", "_uses_shell": false, "warn": false, "stdin_add_newline": true, "strip_empty_ends": true, "argv": null, "chdir": null, "executable": null, "creates": null, "removes": null, "stdin": null}}, "stdout_lines": [], "stderr_lines": [], "_ansible_no_log": null, "failed": false} ##### Work item tracking - Microsoft ADO: 27683903 #### How I did it Increase wait timeout to 60 seconds, because the some time the check status command take 45 seconds. #### How to verify it Pass all test case. #### Description for the changelog Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take too much time.
…atus with systemctl take 45 seconds. (sonic-net#12914) Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take too much time. #### Why I did it Check interfaces-config status with systemctl some times take 45 seconds, however the wait timeout is 10 seconds, which cause test case break: 13/05/2024 23:01:03 base._run L0071 DEBUG | /var/src/sonic-mgmt_vms21-t0-2700_646f1402735219c3e5444094/tests/common/devices/multi_asic.py::_run_on_asics#128: [] AnsibleModule::command, args=["sudo systemctl show --no-pager interfaces-config -p ExecMainExitTimestamp --value"], kwargs={} 13/05/2024 23:01:45 base._run L0108 DEBUG | /var/src/sonic-mgmt_vms21-t0-2700_646f1402735219c3e5444094/tests/common/devices/multi_asic.py::_run_on_asics#128: [] AnsibleModule::command Result => {"changed": true, "stdout": "", "stderr": "", "rc": 0, "cmd": ["sudo", "systemctl", "show", "--no-pager", "interfaces-config", "-p", "ExecMainExitTimestamp", "--value"], "start": "2024-05-13 23:01:00.605392", "end": "2024-05-13 23:01:00.682419", "delta": "0:00:00.077027", "msg": "", "invocation": {"module_args": {"_raw_params": "sudo systemctl show --no-pager interfaces-config -p ExecMainExitTimestamp --value", "_uses_shell": false, "warn": false, "stdin_add_newline": true, "strip_empty_ends": true, "argv": null, "chdir": null, "executable": null, "creates": null, "removes": null, "stdin": null}}, "stdout_lines": [], "stderr_lines": [], "_ansible_no_log": null, "failed": false} ##### Work item tracking - Microsoft ADO: 27683903 #### How I did it Increase wait timeout to 60 seconds, because the some time the check status command take 45 seconds. #### How to verify it Pass all test case. #### Description for the changelog Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take too much time.
Cherry-pick PR to 202305: #13027 |
Cherry-pick PR to 202311: #13028 |
…atus with systemctl take 45 seconds. (#12914) Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take too much time. #### Why I did it Check interfaces-config status with systemctl some times take 45 seconds, however the wait timeout is 10 seconds, which cause test case break: 13/05/2024 23:01:03 base._run L0071 DEBUG | /var/src/sonic-mgmt_vms21-t0-2700_646f1402735219c3e5444094/tests/common/devices/multi_asic.py::_run_on_asics#128: [] AnsibleModule::command, args=["sudo systemctl show --no-pager interfaces-config -p ExecMainExitTimestamp --value"], kwargs={} 13/05/2024 23:01:45 base._run L0108 DEBUG | /var/src/sonic-mgmt_vms21-t0-2700_646f1402735219c3e5444094/tests/common/devices/multi_asic.py::_run_on_asics#128: [] AnsibleModule::command Result => {"changed": true, "stdout": "", "stderr": "", "rc": 0, "cmd": ["sudo", "systemctl", "show", "--no-pager", "interfaces-config", "-p", "ExecMainExitTimestamp", "--value"], "start": "2024-05-13 23:01:00.605392", "end": "2024-05-13 23:01:00.682419", "delta": "0:00:00.077027", "msg": "", "invocation": {"module_args": {"_raw_params": "sudo systemctl show --no-pager interfaces-config -p ExecMainExitTimestamp --value", "_uses_shell": false, "warn": false, "stdin_add_newline": true, "strip_empty_ends": true, "argv": null, "chdir": null, "executable": null, "creates": null, "removes": null, "stdin": null}}, "stdout_lines": [], "stderr_lines": [], "_ansible_no_log": null, "failed": false} ##### Work item tracking - Microsoft ADO: 27683903 #### How I did it Increase wait timeout to 60 seconds, because the some time the check status command take 45 seconds. #### How to verify it Pass all test case. #### Description for the changelog Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take too much time.
…atus with systemctl take 45 seconds. (#12914) Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take too much time. #### Why I did it Check interfaces-config status with systemctl some times take 45 seconds, however the wait timeout is 10 seconds, which cause test case break: 13/05/2024 23:01:03 base._run L0071 DEBUG | /var/src/sonic-mgmt_vms21-t0-2700_646f1402735219c3e5444094/tests/common/devices/multi_asic.py::_run_on_asics#128: [] AnsibleModule::command, args=["sudo systemctl show --no-pager interfaces-config -p ExecMainExitTimestamp --value"], kwargs={} 13/05/2024 23:01:45 base._run L0108 DEBUG | /var/src/sonic-mgmt_vms21-t0-2700_646f1402735219c3e5444094/tests/common/devices/multi_asic.py::_run_on_asics#128: [] AnsibleModule::command Result => {"changed": true, "stdout": "", "stderr": "", "rc": 0, "cmd": ["sudo", "systemctl", "show", "--no-pager", "interfaces-config", "-p", "ExecMainExitTimestamp", "--value"], "start": "2024-05-13 23:01:00.605392", "end": "2024-05-13 23:01:00.682419", "delta": "0:00:00.077027", "msg": "", "invocation": {"module_args": {"_raw_params": "sudo systemctl show --no-pager interfaces-config -p ExecMainExitTimestamp --value", "_uses_shell": false, "warn": false, "stdin_add_newline": true, "strip_empty_ends": true, "argv": null, "chdir": null, "executable": null, "creates": null, "removes": null, "stdin": null}}, "stdout_lines": [], "stderr_lines": [], "_ansible_no_log": null, "failed": false} ##### Work item tracking - Microsoft ADO: 27683903 #### How I did it Increase wait timeout to 60 seconds, because the some time the check status command take 45 seconds. #### How to verify it Pass all test case. #### Description for the changelog Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take too much time.
…atus with systemctl take 45 seconds. (sonic-net#12914) Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take too much time. #### Why I did it Check interfaces-config status with systemctl some times take 45 seconds, however the wait timeout is 10 seconds, which cause test case break: 13/05/2024 23:01:03 base._run L0071 DEBUG | /var/src/sonic-mgmt_vms21-t0-2700_646f1402735219c3e5444094/tests/common/devices/multi_asic.py::_run_on_asics#128: [] AnsibleModule::command, args=["sudo systemctl show --no-pager interfaces-config -p ExecMainExitTimestamp --value"], kwargs={} 13/05/2024 23:01:45 base._run L0108 DEBUG | /var/src/sonic-mgmt_vms21-t0-2700_646f1402735219c3e5444094/tests/common/devices/multi_asic.py::_run_on_asics#128: [] AnsibleModule::command Result => {"changed": true, "stdout": "", "stderr": "", "rc": 0, "cmd": ["sudo", "systemctl", "show", "--no-pager", "interfaces-config", "-p", "ExecMainExitTimestamp", "--value"], "start": "2024-05-13 23:01:00.605392", "end": "2024-05-13 23:01:00.682419", "delta": "0:00:00.077027", "msg": "", "invocation": {"module_args": {"_raw_params": "sudo systemctl show --no-pager interfaces-config -p ExecMainExitTimestamp --value", "_uses_shell": false, "warn": false, "stdin_add_newline": true, "strip_empty_ends": true, "argv": null, "chdir": null, "executable": null, "creates": null, "removes": null, "stdin": null}}, "stdout_lines": [], "stderr_lines": [], "_ansible_no_log": null, "failed": false} ##### Work item tracking - Microsoft ADO: 27683903 #### How I did it Increase wait timeout to 60 seconds, because the some time the check status command take 45 seconds. #### How to verify it Pass all test case. #### Description for the changelog Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take too much time.
Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take too much time.
Why I did it
Check interfaces-config status with systemctl some times take 45 seconds, however the wait timeout is 10 seconds, which cause test case break:
13/05/2024 23:01:03 base._run L0071 DEBUG | /var/src/sonic-mgmt_vms21-t0-2700_646f1402735219c3e5444094/tests/common/devices/multi_asic.py::_run_on_asics#128: [] AnsibleModule::command, args=["sudo systemctl show --no-pager interfaces-config -p ExecMainExitTimestamp --value"], kwargs={}
13/05/2024 23:01:45 base._run L0108 DEBUG | /var/src/sonic-mgmt_vms21-t0-2700_646f1402735219c3e5444094/tests/common/devices/multi_asic.py::_run_on_asics#128: [] AnsibleModule::command Result => {"changed": true, "stdout": "", "stderr": "", "rc": 0, "cmd": ["sudo", "systemctl", "show", "--no-pager", "interfaces-config", "-p", "ExecMainExitTimestamp", "--value"], "start": "2024-05-13 23:01:00.605392", "end": "2024-05-13 23:01:00.682419", "delta": "0:00:00.077027", "msg": "", "invocation": {"module_args": {"_raw_params": "sudo systemctl show --no-pager interfaces-config -p ExecMainExitTimestamp --value", "_uses_shell": false, "warn": false, "stdin_add_newline": true, "strip_empty_ends": true, "argv": null, "chdir": null, "executable": null, "creates": null, "removes": null, "stdin": null}}, "stdout_lines": [], "stderr_lines": [], "_ansible_no_log": null, "failed": false}
Work item tracking
How I did it
Increase wait timeout to 60 seconds, because the some time the check status command take 45 seconds.
How to verify it
Pass all test case.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Fix test_update_forced_mgmt failed because check interfaces-config status with systemctl take too much time.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)