From: Sage Weil Date: Sun, 10 Mar 2013 05:34:24 +0000 (-0800) Subject: schedule_suite.sh: check, but do not sync, clock for each run X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b7ae5d9b701fd15c3334931ff5aa4bdf393910cb;p=teuthology.git schedule_suite.sh: check, but do not sync, clock for each run 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 (cherry picked from commit f1d66d2dd522e8040bc59cfe233d60a6030431e1) --- diff --git a/schedule_suite.sh b/schedule_suite.sh index 4e3145808..7310e4901 100755 --- a/schedule_suite.sh +++ b/schedule_suite.sh @@ -42,7 +42,6 @@ kernel: nuke-on-error: true tasks: - chef: -- clock: overrides: workunit: sha1: $CEPH_SHA1 diff --git a/teuthology/task/clock.py b/teuthology/task/clock.py index e9e6d9dae..5c763a8f4 100644 --- a/teuthology/task/clock.py +++ b/teuthology/task/clock.py @@ -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), + )