-
Notifications
You must be signed in to change notification settings - Fork 727
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
[Mvrf] test_ntp fixed issue: "Host unreachable" #4003
Merged
Merged
Conversation
This file contains 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
@wangxin, Could you please take a look ? |
Signed-off-by: Andrii-Yosafat Lozovyi <andrii-yosafatx.lozovyi@intel.com>
lguohan
force-pushed
the
fix_mvrf_test_ntp
branch
from
August 14, 2021 16:07
ea366a7
to
57e7a64
Compare
added to kvmtest |
looks like this test failed. it is not relavant to ntp, but do you plan look at it as well?
|
@lguohan, |
yxieca
approved these changes
Aug 26, 2021
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
lguohan
force-pushed
the
fix_mvrf_test_ntp
branch
from
August 27, 2021 13:36
57e7a64
to
2f07842
Compare
vmittal-msft
pushed a commit
to vmittal-msft/sonic-mgmt
that referenced
this pull request
Sep 28, 2021
Description of PR Summary: Mvrf test_ntp gets stuck when executing cmd sudo ip vrf exec mgmt ntpd -gq or sudo cgexec -g l3mdev:mgmt ntpd -gq, which eventually lead to test case fail with error: > raise AnsibleConnectionFailure("Host unreachable", dark=cb.unreachable, contacted=cb.contacted) E AnsibleConnectionFailure: Host unreachable This may happen because connection with ntp servers defined in CONFIG_DB are not synchronized: ~$ ntpstat unsynchronised polling server every 8 s So in order to avoid test case getting stuck and failed, test will check ntp connection before enabling mvrf (because after mvrf is enabled ntp connection gets lost) and if it was not synchronized, will setup ntp server on ptf and configure ntp on dut. Fixes # (issue) Approach What is the motivation for this PR? Avoid test_ntp being stuck on executing cmd sudo ip vrf exec mgmt ntpd -gq or sudo cgexec -g l3mdev:mgmt ntpd -gq and make test case pass. How did you do it? Added setup of ntp server on ptf in case ntp is not synchronized. How did you verify/test it? Run mvrf/test_mgmtvrf.py::TestServices::test_ntp on Sonic master and 202012 images: mvrf/test_mgmtvrf.py::TestServices::test_ntp PASSED Signed-off-by: Andrii-Yosafat Lozovyi <andrii-yosafatx.lozovyi@intel.com>
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.
Signed-off-by: Andrii-Yosafat Lozovyi andrii-yosafatx.lozovyi@intel.com
Description of PR
Summary: Mvrf test_ntp gets stuck when executing
cmd sudo ip vrf exec mgmt ntpd -gq
orsudo cgexec -g l3mdev:mgmt ntpd -gq
, which eventually lead to test case fail with error:This may happen because connection with ntp servers defined in CONFIG_DB are not synchronized:
So in order to avoid test case getting stuck and failed, test will check ntp connection before enabling mvrf (because after mvrf is enabled ntp connection gets lost) and if it was not synchronized, will setup ntp server on ptf and configure ntp on dut.
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Avoid test_ntp being stuck on executing cmd
sudo ip vrf exec mgmt ntpd -gq
orsudo cgexec -g l3mdev:mgmt ntpd -gq
and make test case pass.How did you do it?
Added setup of ntp server on ptf in case ntp is not synchronized.
How did you verify/test it?
Run mvrf/test_mgmtvrf.py::TestServices::test_ntp on Sonic master and 202012 images:
mvrf/test_mgmtvrf.py::TestServices::test_ntp PASSED
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation