From: Sage Weil Date: Tue, 3 Sep 2013 19:05:38 +0000 (-0700) Subject: schedule: strip out targets X-Git-Tag: 1.1.0~1904^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F65%2Fhead;p=teuthology.git schedule: strip out targets If the user feeds in a yaml with targets, the worker will launch the job but fail with 2013-09-03T11:18:34.333 CRITICAL:root:AssertionError: You cannot specify targets in a config file when using the --lock option Just strip them out before scheduling. This eases my personal workflow where I have a test I'm running manually against some prelocked machines but also want to schedule it. Signed-off-by: Sage Weil --- diff --git a/teuthology/run.py b/teuthology/run.py index 840799b8d..1244d30c3 100644 --- a/teuthology/run.py +++ b/teuthology/run.py @@ -354,6 +354,11 @@ def schedule(): job.delete() return + # strip out targets; the worker will allocate new ones when we run + # the job with --lock. + if ctx.config.get('targets'): + del ctx.config['targets'] + job_config = dict( config=ctx.config, name=ctx.name,