From 104166b069dfb234725c41ccd857d06d3fba4de3 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Mon, 14 Aug 2023 12:48:47 -0600 Subject: [PATCH] supervisor.reimage(): Improve Sentry reporting 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 --- teuthology/dispatcher/supervisor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/teuthology/dispatcher/supervisor.py b/teuthology/dispatcher/supervisor.py index 4e0172ce3a..c803fb7155 100644 --- a/teuthology/dispatcher/supervisor.py +++ b/teuthology/dispatcher/supervisor.py @@ -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) -- 2.39.5