Alexey Serbin has submitted this change and it was merged. ( 
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
instances of EC2 t2.large type 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 (Section 5.
SNTP Client Operations), but it is what it is.

Because of 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
Reviewed-on: http://gerrit.cloudera.org:8080/15274
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
---
M src/kudu/clock/builtin_ntp.cc
1 file changed, 17 insertions(+), 2 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Adar Dembo: Looks good to me, approved

--
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: merged
Gerrit-Change-Id: I1df3549616bbced696380458978c33264ed636c9
Gerrit-Change-Number: 15274
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to