[tests/generic_config_updater] implement GCU test NTP_SERVER#5803
Merged
wen587 merged 6 commits intosonic-net:masterfrom Jul 8, 2022
Merged
[tests/generic_config_updater] implement GCU test NTP_SERVER#5803wen587 merged 6 commits intosonic-net:masterfrom
wen587 merged 6 commits intosonic-net:masterfrom
Conversation
qiluo-msft
reviewed
Jun 13, 2022
qiluo-msft
reviewed
Jun 17, 2022
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
wen587
commented
Jun 29, 2022
| if output["stdout"] != "active": | ||
| return False | ||
| output = duthost.shell("ps -o etimes -p $(systemctl show ntp.service --property ExecMainPID --value) | sed '1d'") | ||
| if int(output['stdout'].strip()) < 10: |
Contributor
Author
There was a problem hiding this comment.
I treat ntp service as restart when its starting time is less than 10sec.
Correct me if it is not reasonable. #Closed
Contributor
There was a problem hiding this comment.
I am not sure how stable is the 10s hard-coded value. If you know exactly when the service is restarted (by your test script), you can take a timestamp before the restarting and use it to check the etimes.
Contributor
Author
There was a problem hiding this comment.
The restart is embedded into GCU post-check. Seems hard to find the exact time.
10s should be enough. Usually, the elapsed time is just 1 sec.
I am a little worried that the service process is not up if the check is too soon.
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
qiluo-msft
approved these changes
Jul 7, 2022
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: Testcase of ntp server for generic updater apply-patch
[Done] sonic-net/sonic-utilities#2212 NTP restarter
[Done] submodule update
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
End to End test support for Generic Updater apply-patch
How did you do it?
Modify ntp server config to dut and check if config change as expected
How did you verify/test it?
Run test of sonic-mgmt/tests/generic_config_updater/test_ntp.py on KVM
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation