You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Will Berkeley (Code Review)" <ge...@cloudera.org> on 2018/06/01 18:28:57 UTC

[kudu-CR] KUDU-2242 Wait for NTP synchronization on startup

Hello Mike Percy, Kudu Jenkins, Adar Dembo, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/10548

to look at the new patch set (#3).

Change subject: KUDU-2242 Wait for NTP synchronization on startup
......................................................................

KUDU-2242 Wait for NTP synchronization on startup

Sometimes it takes a little while for the clock to be synchronized when
a machine first starts up. Occasionally, this causes Kudu to fail to
start when the host starts up. This patch allows Kudu to wait for
the system clock to become synchronized when using NTP by using
either the 'ntp-wait' or the 'chronyc waitsync' utilities. The amount
of time to wait is controlled by a new flag
--ntp_initial_sync_wait_secs, which defaults to 60. In the common case
when the clock is synchronized when Kudu starts, Kudu does not wait (and
does not incur the cost of waiting on a subprocess). Waiting can be
disabled by setting the new flag to 0.

This is hard to test with a unit test, so I manually tested as follows:

1. Restart Kudu on a machine with the clock sync'd. There was no waiting
   for synchronization.
2. Using both ntpd and chrony, stop the time daemon, set the clock back, and
   start Kudu, confirming Kudu existed immediately after the wait
   utilities were unable to contact the daemons.
3. Using both ntpd and chrony, stop the time daemon and Kudu, wait for
   the clock to be a little out of sync, then start the time daemon and
   Kudu, confirming that Kudu waited until the clock was in sync and
   started successfully.

Change-Id: I6082c5d35ed0d230d91c61734e7b5a351e50933b
---
M src/kudu/clock/system_ntp.cc
1 file changed, 58 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/10548/3
-- 
To view, visit http://gerrit.cloudera.org:8080/10548
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6082c5d35ed0d230d91c61734e7b5a351e50933b
Gerrit-Change-Number: 10548
Gerrit-PatchSet: 3
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>