]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
schedule: strip out targets 65/head
authorSage Weil <sage@inktank.com>
Tue, 3 Sep 2013 19:05:38 +0000 (12:05 -0700)
committerSage Weil <sage@inktank.com>
Tue, 3 Sep 2013 19:05:38 +0000 (12:05 -0700)
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 <sage@inktank.com>
teuthology/run.py

index 840799b8d39424a14d55640c5335e97ebc9a3dd6..1244d30c3e6a69a3f354d83a9614f6a5baaebfbd 100644 (file)
@@ -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,