From: David Galloway Date: Tue, 6 Feb 2018 16:33:05 +0000 (-0500) Subject: clock: Force use of settimeofday() syscall X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fheads%2Fwip-ntp-debug;p=teuthology.git clock: Force use of settimeofday() syscall From ntpdate man page: '-b Force the time to be stepped using the settimeofday() system call, rather than slewed (default) using the adjtime() system call. This option should be used when called from a startup file at boot time.' I think we're still having issues with time because when the current FOG images were captured, they have the Ubuntu or CentOS pool hardcoded in ntp.conf. So the NTP service starts on boot and slews the clock toward the time the public servers provide. Then, when ceph-cm-ansible gets run and the NTP servers are replaced with our own, the clock slowly slews back toward what our timeservers say the time is. According to the ntpdate man page, it can take hours for the clock to skew to the right time if the difference is greater than +-500 ms leading me to believe the clock still isn't set correctly by the start OR end of a job when the adjtime() syscall is used. Signed-off-by: David Galloway --- diff --git a/teuthology/task/clock.py b/teuthology/task/clock.py index cf3fe1784..0e383d4e5 100644 --- a/teuthology/task/clock.py +++ b/teuthology/task/clock.py @@ -44,8 +44,7 @@ def task(ctx, config): run.Raw('||'), 'sudo', 'service', 'ntpd', 'stop', run.Raw(';'), - 'sudo', - 'ntpdate', + 'sudo', 'ntpdate', '-b', ] args.extend(servers) args.extend([