]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Store the job_id as a str, not an int.
authorZack Cerza <zack@cerza.org>
Fri, 4 Oct 2013 17:35:03 +0000 (12:35 -0500)
committerZack Cerza <zack@cerza.org>
Fri, 4 Oct 2013 18:11:03 +0000 (13:11 -0500)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/queue.py
teuthology/run.py

index 155f2a333bc7e71b213b728e5dadcd665db5d7d4..4c5451c1091b8bed065d530f1650198129a70bfc 100644 (file)
@@ -160,7 +160,7 @@ describe. One job is run at a time.
         log.debug('Config is: %s', job.body)
         job_config = yaml.safe_load(job.body)
 
-        job_config['job_id'] = job.jid
+        job_config['job_id'] = str(job.jid)
         safe_archive = safepath.munge(job_config['name'])
         archive_path_full = os.path.join(ctx.archive_dir, safe_archive, str(job.jid))
         job_config['archive_path'] = archive_path_full
index 65159540674bc8c3176b7dff86a047cfa3f91b18..cdeee7b523d722504be1ffe90491e256aae5dd10 100644 (file)
@@ -153,7 +153,6 @@ def main():
     from .orchestra import monkey
     monkey.patch_all()
 
-
     # WARNING: Do not import any modules that import logging before this next
     # block. That would cause connections to hang because the monkey patching
     # hadn't been done.
@@ -169,6 +168,13 @@ def main():
         from teuthology.misc import get_user
         ctx.owner = get_user()
 
+    # Older versions of teuthology stored job_id as an int. Convert it to a str
+    # if necessary.
+    job_id = ctx.config.get('job_id')
+    if job_id is not None:
+        job_id = str(job_id)
+        ctx.config['job_id'] = job_id
+
     write_initial_metadata(ctx)
     report.try_push_job_info(ctx.config)