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 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-03-11 08:31:00 +03:00
parent 9df29b1be9
commit d8ffe3d3a5
2 changed files with 3 additions and 1 deletions

View File

@@ -1439,6 +1439,7 @@ func redfishCriticalEndpoints(systemPaths, chassisPaths, managerPaths []string)
add(p) add(p)
add(joinPath(p, "/NetworkProtocol")) add(joinPath(p, "/NetworkProtocol"))
} }
add("/redfish/v1")
add("/redfish/v1/UpdateService") add("/redfish/v1/UpdateService")
add("/redfish/v1/UpdateService/FirmwareInventory") add("/redfish/v1/UpdateService/FirmwareInventory")
return out return out

View File

@@ -3,6 +3,7 @@ package collector
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"log"
"sort" "sort"
"strings" "strings"
"time" "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..."}) emit(Progress{Status: "running", Progress: 10, Message: "Redfish snapshot: replay service root..."})
} }
if _, err := r.getJSON("/redfish/v1"); err != nil { 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") systemPaths := r.discoverMemberPaths("/redfish/v1/Systems", "/redfish/v1/Systems/1")