From 98fe2c90da4d8dc47694bf288531f72560576607 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Tue, 6 Feb 2018 11:33:05 -0500 Subject: [PATCH] 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 --- teuthology/task/clock.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/teuthology/task/clock.py b/teuthology/task/clock.py index cf3fe1784d..0e383d4e5e 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([ -- 2.39.5