]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
When bootstrap/fetch fails, mark the job as dead 865/head
authorZack Cerza <zack@redhat.com>
Tue, 24 May 2016 23:33:21 +0000 (17:33 -0600)
committerZack Cerza <zack@redhat.com>
Wed, 25 May 2016 15:55:19 +0000 (09:55 -0600)
Note that this will only happen *after* all retries have failed.

http://tracker.ceph.com/issues/13925
Fixes: 13925
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/worker.py

index a6982049baecb28b36fff31bba30ffaa873380b5..6a1e16fd5a1c4163d8aa0a883fb80928f598e6f0 100644 (file)
@@ -14,7 +14,7 @@ from . import report
 from . import safepath
 from .config import config as teuth_config
 from .config import set_config_attr
-from .exceptions import BranchNotFoundError, SkipJob
+from .exceptions import BranchNotFoundError, SkipJob, MaxWhileTries
 from .kill import kill_job
 from .repo_utils import fetch_qa_suite, fetch_teuthology
 
@@ -159,6 +159,13 @@ def prep_job(job_config, log_file_path, archive_dir):
             dict(status='dead', failure_reason=str(exc))
         )
         raise SkipJob()
+    except MaxWhileTries as exc:
+        log.exception("Failed to fetch or bootstrap; marking job as dead")
+        report.try_push_job_info(
+            job_config,
+            dict(status='dead', failure_reason=str(exc))
+        )
+        raise SkipJob()
 
     teuth_bin_path = os.path.join(teuth_path, 'virtualenv', 'bin')
     if not os.path.isdir(teuth_bin_path):