Skip to content

Commit

Permalink
supervisor.reimage(): Improve Sentry reporting
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
zmc committed Aug 14, 2023
1 parent 7fda959 commit 104166b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion teuthology/dispatcher/supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 104166b

Please sign in to comment.