]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
supervisor.reimage(): Improve Sentry reporting 1882/head
authorZack Cerza <zack@redhat.com>
Mon, 14 Aug 2023 18:48:47 +0000 (12:48 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 14 Aug 2023 18:48:47 +0000 (12:48 -0600)
Set the `task` tag value to 'reimage' when reporting reimage failures to
Sentry, to make searching for them in its UI easier.

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/dispatcher/supervisor.py

index 4e0172ce3a66b5e59815ae5506d6a5463e967d6d..c803fb7155ec2849290165396c0e19ea9bbf56c9 100644 (file)
@@ -233,7 +233,11 @@ 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)}
+        # There isn't an actual task called "reimage", but it doesn't seem
+        # necessary to create a whole new Sentry tag for this.
+        ctx.summary = {
+            'sentry_event': sentry.report_error(job_config, e, task_name="reimage")
+        }
         nuke.nuke(ctx, True)
         # Machine that fails to reimage after 10 times will be marked down
         check_for_reimage_failures_and_mark_down(targets)