]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
schedule_suite.sh: check, but do not sync, clock for each run
authorSage Weil <sage@inktank.com>
Sun, 10 Mar 2013 05:34:24 +0000 (21:34 -0800)
committerSage Weil <sage@inktank.com>
Sun, 10 Mar 2013 05:34:24 +0000 (21:34 -0800)
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>
schedule_suite.sh
teuthology/task/clock.py

index bdbd78771aa537898ee7051c5e727c72a651c05a..321c03c17a1a4bec7aa54171183425a663eb6653 100755 (executable)
@@ -63,7 +63,6 @@ nuke-on-error: true
 machine_type: $mtype
 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),
+                )