]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
clock: Force use of settimeofday() syscall wip-ntp-debug
authorDavid Galloway <dgallowa@redhat.com>
Tue, 6 Feb 2018 16:33:05 +0000 (11:33 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Tue, 6 Feb 2018 17:09:26 +0000 (12:09 -0500)
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 <dgallowa@redhat.com>
teuthology/task/clock.py

index cf3fe1784d98366d86f8dfbf639375d1873b0733..0e383d4e5e8f364c9e61a6e01ba46f2a01a99319 100644 (file)
@@ -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([