From d8ffe3d3a56ad78dccb425e96dd03e0be262e4c4 Mon Sep 17 00:00:00 2001 From: Mikhail Chusavitin Date: Wed, 11 Mar 2026 08:31:00 +0300 Subject: [PATCH] redfish: add service root to critical endpoints, tolerate missing root in replay Add /redfish/v1 to redfishCriticalEndpoints so plan-B retries the service root if it failed during the main crawl. Also downgrade the missing-root error in ReplayRedfishFromRawPayloads from fatal to a warning so analysis can complete with defaults when the root doc was not recovered. Co-Authored-By: Claude Sonnet 4.6 --- internal/collector/redfish.go | 1 + internal/collector/redfish_replay.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/collector/redfish.go b/internal/collector/redfish.go index 5ae1faf..aa4051b 100644 --- a/internal/collector/redfish.go +++ b/internal/collector/redfish.go @@ -1439,6 +1439,7 @@ func redfishCriticalEndpoints(systemPaths, chassisPaths, managerPaths []string) add(p) add(joinPath(p, "/NetworkProtocol")) } + add("/redfish/v1") add("/redfish/v1/UpdateService") add("/redfish/v1/UpdateService/FirmwareInventory") return out diff --git a/internal/collector/redfish_replay.go b/internal/collector/redfish_replay.go index ba06320..8d5da38 100644 --- a/internal/collector/redfish_replay.go +++ b/internal/collector/redfish_replay.go @@ -3,6 +3,7 @@ package collector import ( "encoding/json" "fmt" + "log" "sort" "strings" "time" @@ -30,7 +31,7 @@ func ReplayRedfishFromRawPayloads(rawPayloads map[string]any, emit ProgressFn) ( emit(Progress{Status: "running", Progress: 10, Message: "Redfish snapshot: replay service root..."}) } if _, err := r.getJSON("/redfish/v1"); err != nil { - return nil, fmt.Errorf("redfish service root: %w", err) + log.Printf("redfish replay: service root /redfish/v1 missing from snapshot, continuing with defaults: %v", err) } systemPaths := r.discoverMemberPaths("/redfish/v1/Systems", "/redfish/v1/Systems/1")