From 1425cfe3fdc09a487fa89dded4a756c96bd0eb0e Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 27 Jul 2023 11:49:16 -0600 Subject: [PATCH] supervisor.reimage: Report failures to Sentry Signed-off-by: Zack Cerza --- teuthology/dispatcher/supervisor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/teuthology/dispatcher/supervisor.py b/teuthology/dispatcher/supervisor.py index b197f1c829..98bbb3f63a 100644 --- a/teuthology/dispatcher/supervisor.py +++ b/teuthology/dispatcher/supervisor.py @@ -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) -- 2.39.5