From f1d66d2dd522e8040bc59cfe233d60a6030431e1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 9 Mar 2013 21:34:24 -0800 Subject: [PATCH] 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 --- schedule_suite.sh | 1 - teuthology/task/clock.py | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/schedule_suite.sh b/schedule_suite.sh index bdbd78771aa53..321c03c17a1a4 100755 --- a/schedule_suite.sh +++ b/schedule_suite.sh @@ -63,7 +63,6 @@ nuke-on-error: true machine_type: $mtype tasks: - chef: -- clock: overrides: workunit: sha1: $CEPH_SHA1 diff --git a/teuthology/task/clock.py b/teuthology/task/clock.py index e9e6d9daec442..5c763a8f42ad0 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), + ) -- 2.39.5