Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/17582 )
Change subject: [clock] change clock source selection for 'auto' ...................................................................... [clock] change clock source selection for 'auto' This patch changes the logic to select particular time source when the pseudo-source 'auto' used for --time_source. Before this patch, the 'system' time source would be auto-selected if a Kudu server with --time_source=auto is run in an environment where the instance detector isn't aware of a dedicated NTP server (those are usually available via the host-only interface, at least for EC2 and GCE instances). After this patch, the 'builtin' time source would be auto-selected if a Kudu server runs with --time_source=auto in environment where the instance detector isn't aware of dedicated NTP servers AND the --builtin_ntp_servers flag is set to a valid value. Otherwise, if --builtin_ntp_servers flag is set to an empty/invalid value, 'system' becomes the auto-selected time source for platforms supporting get_ntptime() API, otherwise the catch-all case is used to auto-select 'system_unsync' as the time source. I also added a new test scenario to cover the updated functionality. Change-Id: I72cb54c488b2aa2c73acd6e6e5f6e50dd5811175 Reviewed-on: http://gerrit.cloudera.org:8080/17582 Tested-by: Kudu Jenkins Reviewed-by: Andrew Wong <[email protected]> --- M src/kudu/clock/builtin_ntp.cc M src/kudu/clock/builtin_ntp.h M src/kudu/clock/hybrid_clock-test.cc M src/kudu/clock/hybrid_clock.cc M src/kudu/clock/hybrid_clock.h M src/kudu/clock/ntp-test.cc M src/kudu/server/default_path_handlers.cc 7 files changed, 146 insertions(+), 60 deletions(-) Approvals: Kudu Jenkins: Verified Andrew Wong: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/17582 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I72cb54c488b2aa2c73acd6e6e5f6e50dd5811175 Gerrit-Change-Number: 17582 Gerrit-PatchSet: 4 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241)
