From f3db12f02546f0c36a887fcf4aa5378ece79cf7c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 3 Sep 2013 12:05:38 -0700 Subject: [PATCH] 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 --- teuthology/run.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/teuthology/run.py b/teuthology/run.py index 840799b8d3..1244d30c3e 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, -- 2.39.5