]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
supervisor.reimage: Report failures to Sentry reimage-errs-sentry 1875/head
authorZack Cerza <zack@redhat.com>
Thu, 27 Jul 2023 17:49:16 +0000 (11:49 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 27 Jul 2023 17:49:16 +0000 (11:49 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/dispatcher/supervisor.py

index b197f1c829d18899be008a026513b8d623a86ec0..98bbb3f63a44cf17d4e4f2e9ef0aa15672bfad1a 100644 (file)
@@ -19,6 +19,7 @@ from teuthology.lock import ops as lock_ops
 from teuthology.task import internal
 from teuthology.misc import decanonicalize_hostname as shortname
 from teuthology.lock import query
+from teuthology.util import sentry
 
 log = logging.getLogger(__name__)
 
@@ -232,6 +233,7 @@ def reimage(job_config):
             ctx.config,
             dict(status='dead', failure_reason='Error reimaging machines: ' + str(e))
         )
+        ctx.summary['sentry_event'] = sentry.report_error(job_config, e)
         nuke.nuke(ctx, True)
         # Machine that fails to reimage after 10 times will be marked down
         check_for_reimage_failures_and_mark_down(targets)