Alexey Serbin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/15274


Change subject: [clock] relax version constraint for NTP response
......................................................................

[clock] relax version constraint for NTP response

As it turned out, there are NTP servers in the wild that respond back
with version 4 even if they support version 3 and the client sent
version 3 in its request packet.  In this particular case, it was the
dedicated server in one of r5ad.xlarge EC2 instances provisioned in
EC2 us-west-2 (interestingly enough, the dedicated NTP servers of
other EC2 t2.large instances in my test cluster behaved as expected).
The observed behavior of the dedicated NTP server at the mentioned
r5ad.xlarge instance appears to contradict the information presented
in RFC 5905 (appendix A.5.3. fast_xmit()) and RFC 4330 (Secion 5.
SNTP Client Operations), but it is what it is.

Because the former strict constraint in the built-in NTP client,
it was not able to work with such NTP servers.

This patch relaxes the requirement for expected NTP versions sent in
a server's response.  For details, see the corresponding comment
in builtin_ntp.cc.

As for testing and verification, I ran the updated code and verified
that the built-in NTP client is now able to work with the NTP server
mentioned above, tracking true time as expected.  As a side note,
I also explored options to implement a test scenario using MiniChronyd,
but I found no way to configure chronyd to behave in a non-conforming
manner described above.

Change-Id: I1df3549616bbced696380458978c33264ed636c9
---
M src/kudu/clock/builtin_ntp.cc
1 file changed, 17 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/74/15274/1
--
To view, visit http://gerrit.cloudera.org:8080/15274
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1df3549616bbced696380458978c33264ed636c9
Gerrit-Change-Number: 15274
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>

Reply via email to