From b64198235d7e4fdae69957c27cfd9eaa70cd2055 Mon Sep 17 00:00:00 2001 From: dv Date: Wed, 15 Apr 2026 17:13:24 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BE=D0=B9=20=D1=84=D0=B8=D0=BA=D1=81=20?= =?UTF-8?q?=D0=BF=D0=B0=D1=80=D1=81=D0=B8=D0=BD=D0=B3=D0=B0=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/settings.local.json | 6 +++++- backend/app/services/discovery/orchestrator.py | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 2398331..dd6b538 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -19,7 +19,11 @@ "Bash(python3 -c \":*)", "Bash(python -c ':*)", "Bash(node_modules/.bin/tsc --noEmit)", - "Bash(./node_modules/.bin/tsc --noEmit)" + "Bash(./node_modules/.bin/tsc --noEmit)", + "Bash(python -m py_compile \"C:/Users/Professional/Documents/VSCode/utp_service/backend/app/services/sse.py\")", + "Bash(python -m py_compile \"C:/Users/Professional/Documents/VSCode/utp_service/backend/app/services/discovery/orchestrator.py\")", + "Bash(python -m py_compile \"C:/Users/Professional/Documents/VSCode/utp_service/backend/app/services/discovery/config_parser.py\")", + "Bash(python -m py_compile \"C:/Users/Professional/Documents/VSCode/utp_service/backend/app/routers/objects.py\")" ] } } diff --git a/backend/app/services/discovery/orchestrator.py b/backend/app/services/discovery/orchestrator.py index 1232139..2a8c5ed 100644 --- a/backend/app/services/discovery/orchestrator.py +++ b/backend/app/services/discovery/orchestrator.py @@ -172,7 +172,7 @@ async def discover_via_ssh( except Exception as exc: # Session is now invalid after a failed flush — capture the error so we can # still emit disc_rack_done before propagating and aborting discovery. - _flush_error = RuntimeError(f"DB flush failed after rack {rack_host}: {exc}") from exc + _flush_error = exc except Exception as exc: # Unexpected per-rack error (e.g. SSH timeout, config parse failure not caught @@ -188,7 +188,7 @@ async def discover_via_ssh( }) if _flush_error: - raise _flush_error + raise RuntimeError(f"DB flush failed after rack {rack_host}: {_flush_error}") from _flush_error # ── Phase 2.5: Slave rack discovery via ARP ─────────────────────────────── all_rack_ips_set = {h for _, h, _, _ in rack_hosts}