]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
schedule_suite.sh: check, but do not sync, clock for each run argonaut
authorSage Weil <sage@inktank.com>
Sun, 10 Mar 2013 05:34:24 +0000 (21:34 -0800)
committerSage Weil <sage@inktank.com>
Tue, 30 Apr 2013 17:11:01 +0000 (10:11 -0700)
Trust NTP to actually sync things.  But check the clock skew so we can
verify it if something seems off.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit f1d66d2dd522e8040bc59cfe233d60a6030431e1)

schedule_suite.sh
teuthology/task/clock.py

index 4e3145808d8c2b9bdf5ba1277bf4d0405f1f0897..7310e4901c79625246be64ee76a4f100f22162cf 100755 (executable)
@@ -42,7 +42,6 @@ kernel:
 nuke-on-error: true
 tasks:
 - chef:
-- clock:
 overrides:
   workunit:
     sha1: $CEPH_SHA1
index e9e6d9daec44265940e8ea34820662369ffeaebb..5c763a8f42ad005759bb40a1153c59ced9909262 100644 (file)
@@ -62,3 +62,28 @@ def task(ctx, config):
                     ],
                 logger=log.getChild(rem.name),
                 )
+
+
+@contextlib.contextmanager
+def check(ctx, config):
+    log.info('Checking initial clock skew...')
+    for rem in ctx.cluster.remotes.iterkeys():
+        rem.run(
+            args=[
+                'ntpdc', '-p',
+                ],
+            logger=log.getChild(rem.name),
+            )
+
+    try:
+        yield
+
+    finally:
+        log.info('Checking final clock skew...')
+        for rem in ctx.cluster.remotes.iterkeys():
+            rem.run(
+                args=[
+                    'ntpdc', '-p',
+                    ],
+                logger=log.getChild(rem.name),
+                )