-
Notifications
You must be signed in to change notification settings - Fork 715
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
[tests/generic_config_updater] implement GCU test NTP_SERVER #5803
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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: |
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.
I treat ntp service as restart when its starting time is less than 10sec.
Correct me if it is not reasonable. #Closed
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.
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
.
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.
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.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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