]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Make run_job merge job_config['config'] if needed
authorZack Cerza <zack@cerza.org>
Mon, 16 Sep 2013 18:14:52 +0000 (13:14 -0500)
committerZack Cerza <zack@cerza.org>
Mon, 16 Sep 2013 18:14:52 +0000 (13:14 -0500)
teuthology/queue.py

index 35afaadb77f3cb743d0471f619526829b8f92535..0fa336e595149e54eaa336ec6e7423cac9ea9f7e 100644 (file)
@@ -207,6 +207,16 @@ def run_job(job_config, teuth_bin_path):
     arg = [
         os.path.join(teuth_bin_path, 'teuthology'),
     ]
+    # The following is for compatibility with older schedulers, from before we
+    # started merging the contents of job_config['config'] into job_config
+    # itself.
+    if 'config' in job_config:
+        inner_config = job_config.pop('config')
+        if not isinstance(inner_config, dict):
+            log.debug("run_job: job_config['config'] isn't a dict, it's a %s",
+                      str(type(inner_config)))
+        else:
+            job_config.update(inner_config)
 
     if job_config['verbose']:
         arg.append('-v')