diff --git a/bible-local/05-collectors.md b/bible-local/05-collectors.md index dde4e65..f43bacf 100644 --- a/bible-local/05-collectors.md +++ b/bible-local/05-collectors.md @@ -146,9 +146,37 @@ them from the top-level `Chassis` collection. Standard Redfish `Chassis/*/Sensor replayed alongside legacy threshold/thermal/power sources. Server PSUs prefer the host system's linked chassis, falling back to all chassis only when that source is empty. +### Giga Computing AST2600 and G894/B300 + +Giga Computing's *Redfish API Reference Guide for ASPEED AST2600*, Rev. 1.0, is a BMC-family +reference, not a server SKU compatibility list. The `giga-ast2600` profile therefore matches +Giga/Gigabyte manufacturer identity together with the documented `Gbt`/`Gct` OEM namespaces. +It must not infer AST2600 applicability from AMI alone because AMI firmware is shared by other +server vendors. + +The bounded G894/B300 walker is enabled only when that vendor identity is combined with a G894, +B300, or `Systems/HGX_Baseboard_*` topology signal. It follows the guide's inventory collections +and their advertised `Members` for host/HGX systems, chassis, processors, memory, storage, PCIe, +network adapters, power, sensors, and firmware. It does not numerically guess children of empty +collections. + +The following linked branches are excluded from the default G894/B300 inventory snapshot because +they are configuration, security, action, fabric-counter, or telemetry-history data rather than +normalized hardware inputs: + +- `Fabrics/*` port metrics and NVIDIA histograms +- `TrustedComponents/*`, certificate stores, `ComponentIntegrity`, and RoT protected-component data +- metrics subresources and diagnostic-token services +- action, composition, telemetry, and job-service resources + +Component chassis roots are still collected. Their real advertised inventory children, including +GPU PCIe devices, ConnectX adapters, sensors, and power resources, remain crawlable. Generic guessed +critical suffixes are removed from HGX component chassis and the composed HGX system; the composed +system retains `Processors` and `Memory`, while host inventory continues under `Systems/Self`. + Profile matching and acquisition tuning must be regression-tested against repo-owned compact fixtures under `internal/collector/redfishprofile/testdata/`, derived from representative -raw-export snapshots, for at least MSI and Supermicro shapes. +raw-export snapshots, for at least MSI, Supermicro, and Giga G894/B300 shapes. When multiple raw-export snapshots exist for the same platform, profile selection must remain stable across those sibling fixtures unless the topology actually changes. Analysis-plan metadata should be stored in replay raw payloads so vendor hook activation is diff --git a/bible-local/10-decisions.md b/bible-local/10-decisions.md index 069f74b..2efa183 100644 --- a/bible-local/10-decisions.md +++ b/bible-local/10-decisions.md @@ -2178,3 +2178,33 @@ are absent. - `Systems.Members` ordering no longer changes normalized results. - Existing single-system snapshots keep their previous behavior. - Replay remains deterministic and the existing raw export can be re-analyzed without recollection. + +--- + +## ADL-075 — Giga AST2600 profile uses advertised collections and bounds G894/B300 traversal + +**Date:** 2026-09-28 +**Context:** A Giga Computing G894-SD3-AAX7 B300 collection took 30 minutes and issued 6,320 +requests while retaining 2,911 documents. The generic recursive crawler followed 882 `Fabrics` +documents, security/certificate/RoT branches, NVLink metrics and histogram buckets; generic numeric +post-probe selected 140 collections. An empty `Systems/HGX_Baseboard_0/PCIeDevices` collection then +triggered slow numeric plan-B and contributed most of its 3m17s runtime. The vendor's *Redfish API +Reference Guide for ASPEED AST2600*, Rev. 1.0, defines ordinary inventory collections through their +advertised `Members`; it identifies a BMC family and does not enumerate compatible server SKUs. + +**Decision:** Add a `giga-ast2600` profile matched by Giga/Gigabyte manufacturer identity plus the +documented `Gbt`/`Gct` OEM namespaces. Enable its aggressive bounded walker only with a G894, B300, +or `Systems/HGX_Baseboard_*` topology signal. On that topology, trust advertised collection members, +cap the snapshot at 12,000 documents, disable numeric collection post-probe, empty-collection slow +retry, and profile plan-B, and prune non-inventory fabric telemetry, histograms, metrics, security, +certificate, action, composition, telemetry, job, and diagnostic-token branches. Retain host and +component roots and all advertised CPU, DIMM/HBM, storage, PCIe/NIC/GPU, PSU, sensor, and firmware +inventory paths. HGX path grammar alone must not activate the Supermicro vendor profile. + +**Consequences:** +- G894/B300 collection no longer explores the branches responsible for the observed 30-minute run. +- Ordinary Giga AST2600 servers are recognized without receiving B300-only aggressive pruning. +- The profile applies by documented BMC/OEM identity rather than a hardcoded serial number or one + exact product suffix. +- Offline replay remains deterministic and resolves vendor identity from `Systems/Self`; the walker + changes acquisition breadth without removing normalized inventory inputs. diff --git a/internal/collector/redfishprofile/fixture_test.go b/internal/collector/redfishprofile/fixture_test.go index f41f03f..7b3e09c 100644 --- a/internal/collector/redfishprofile/fixture_test.go +++ b/internal/collector/redfishprofile/fixture_test.go @@ -260,6 +260,69 @@ func TestBuildAcquisitionPlan_Fixture_AMI_Generic(t *testing.T) { } } +func TestBuildAcquisitionPlan_Fixture_Giga_G894_B300(t *testing.T) { + signals := loadProfileFixtureSignals(t, "giga-g894-b300.json") + match := MatchProfiles(signals) + plan := BuildAcquisitionPlan(signals) + resolved := ResolveAcquisitionPlan(match, plan, discoveredResourcesFromSignals(signals), signals) + + if match.Mode != ModeMatched { + t.Fatalf("expected matched mode, got %q", match.Mode) + } + assertProfileSelected(t, match, "giga-ast2600") + assertProfileSelected(t, match, "ami-family") + assertProfileSelected(t, match, "hgx-topology") + assertProfileNotSelected(t, match, "supermicro") + + if plan.Tuning.SnapshotMaxDocuments != 12000 { + t.Fatalf("expected bounded Giga B300 snapshot cap, got %d", plan.Tuning.SnapshotMaxDocuments) + } + if plan.Tuning.PostProbePolicy.EnableNumericCollectionProbe { + t.Fatal("expected Giga B300 to disable numeric collection probing") + } + if plan.Tuning.RecoveryPolicy.EnableCriticalSlowProbe { + t.Fatal("expected Giga B300 to disable slow critical probing") + } + if plan.Tuning.RecoveryPolicy.EnableEmptyCriticalCollectionRetry { + t.Fatal("expected Giga B300 to disable empty collection retry") + } + if plan.Tuning.RecoveryPolicy.EnableProfilePlanB { + t.Fatal("expected Giga B300 to disable profile plan-B") + } + for _, want := range []string{ + "/Fabrics", + "/TrustedComponents", + "/Oem/NvidiaRoT/RoTProtectedComponents", + "/Certificates", + "/Metrics", + } { + if !containsString(plan.Tuning.SnapshotExcludeContains, want) { + t.Fatalf("expected snapshot exclusion %q, got %v", want, plan.Tuning.SnapshotExcludeContains) + } + } + + if !containsString(resolved.SeedPaths, "/redfish/v1/Systems/HGX_Baseboard_0/Processors") { + t.Fatal("expected HGX processor inventory seed") + } + if !containsString(resolved.SeedPaths, "/redfish/v1/Systems/HGX_Baseboard_0/Memory") { + t.Fatal("expected HGX memory inventory seed") + } + for _, unwanted := range []string{ + "/redfish/v1/Systems/HGX_Baseboard_0/PCIeDevices", + "/redfish/v1/Systems/HGX_Baseboard_0/Storage", + "/redfish/v1/Systems/HGX_Baseboard_0/Bios", + "/redfish/v1/Chassis/HGX_GPU_0/Oem/Public", + "/redfish/v1/Chassis/HGX_GPU_0/Power", + } { + if containsString(resolved.CriticalPaths, unwanted) || containsString(resolved.SeedPaths, unwanted) { + t.Fatalf("did not expect guessed Giga B300 path %q", unwanted) + } + } + if !containsString(resolved.SeedPaths, "/redfish/v1/Systems/Self/Storage") { + t.Fatal("expected host storage inventory to remain in the plan") + } +} + func TestBuildAcquisitionPlan_Fixture_UnknownVendor(t *testing.T) { signals := loadProfileFixtureSignals(t, "unknown-vendor.json") match := MatchProfiles(signals) diff --git a/internal/collector/redfishprofile/matcher_test.go b/internal/collector/redfishprofile/matcher_test.go index 8a63e06..0aa7695 100644 --- a/internal/collector/redfishprofile/matcher_test.go +++ b/internal/collector/redfishprofile/matcher_test.go @@ -83,6 +83,94 @@ func TestBuildAcquisitionPlan_HGXDisablesNVMePostProbe(t *testing.T) { } } +func TestMatchProfiles_GigaManufacturerAloneDoesNotClaimAST2600(t *testing.T) { + match := MatchProfiles(MatchSignals{ + ServiceRootVendor: "AMI", + SystemManufacturer: "Giga Computing", + SystemModel: "Generic Server", + OEMNamespaces: []string{"Ami"}, + }) + for _, profile := range match.Profiles { + if profile.Name() == "giga-ast2600" { + t.Fatal("did not expect Giga AST2600 profile without Gbt/Gct OEM evidence") + } + } +} + +func TestBuildAcquisitionPlan_GigaAST2600NonAcceleratorKeepsGenericRecovery(t *testing.T) { + signals := MatchSignals{ + ServiceRootVendor: "AMI", + SystemManufacturer: "Giga Computing", + SystemModel: "R-series server", + OEMNamespaces: []string{"Ami", "Gbt", "Gct"}, + ResourceHints: []string{"/redfish/v1/Systems/Self", "/redfish/v1/Chassis/Self"}, + } + match := MatchProfiles(signals) + plan := BuildAcquisitionPlan(signals) + found := false + for _, profile := range match.Profiles { + if profile.Name() == "giga-ast2600" { + found = true + break + } + } + if !found { + t.Fatal("expected Giga AST2600 profile with Gbt/Gct OEM evidence") + } + if !plan.Tuning.PostProbePolicy.EnableNumericCollectionProbe { + t.Fatal("expected non-accelerator Giga platform to retain generic numeric recovery") + } + if plan.Tuning.SnapshotMaxDocuments == 12000 { + t.Fatal("did not expect G894/B300 snapshot cap on a generic Giga server") + } +} + +func TestCollectSignalsFromTree_GigaComposedSystemPrefersHostSelf(t *testing.T) { + tree := map[string]interface{}{ + "/redfish/v1": map[string]interface{}{ + "Vendor": "AMI", + "Product": "AMI Redfish Server", + "Oem": map[string]interface{}{ + "Ami": map[string]interface{}{}, + }, + }, + "/redfish/v1/Systems": map[string]interface{}{ + "Members": []interface{}{ + map[string]interface{}{"@odata.id": "/redfish/v1/Systems/HGX_Baseboard_0"}, + map[string]interface{}{"@odata.id": "/redfish/v1/Systems/Self"}, + }, + }, + "/redfish/v1/Systems/HGX_Baseboard_0": map[string]interface{}{ + "Manufacturer": "NVIDIA", + "Model": "NA", + }, + "/redfish/v1/Systems/Self": map[string]interface{}{ + "Manufacturer": "Giga Computing", + "Model": "G894-SD3-AAX7-000", + "Oem": map[string]interface{}{ + "Gbt": map[string]interface{}{}, + "Gct": map[string]interface{}{}, + }, + }, + } + + signals := CollectSignalsFromTree(tree) + if signals.SystemManufacturer != "Giga Computing" || signals.SystemModel != "G894-SD3-AAX7-000" { + t.Fatalf("expected host Self identity, got manufacturer=%q model=%q", signals.SystemManufacturer, signals.SystemModel) + } + match := MatchProfiles(signals) + found := false + for _, profile := range match.Profiles { + if profile.Name() == "giga-ast2600" { + found = true + break + } + } + if !found { + t.Fatal("expected Giga AST2600 profile from composed snapshot") + } +} + func TestResolveAcquisitionPlan_ExpandsScopedPaths(t *testing.T) { signals := MatchSignals{} match := MatchProfiles(signals) diff --git a/internal/collector/redfishprofile/profile_giga_ast2600.go b/internal/collector/redfishprofile/profile_giga_ast2600.go new file mode 100644 index 0000000..2655b0a --- /dev/null +++ b/internal/collector/redfishprofile/profile_giga_ast2600.go @@ -0,0 +1,177 @@ +package redfishprofile + +import "strings" + +// gigaAST2600Profile models the Redfish shape documented by Giga Computing's +// "Redfish API Reference Guide for ASPEED AST2600" (Rev. 1.0). The guide is a +// BMC-family reference rather than a server SKU list, so matching uses the Giga +// manufacturer plus Gbt/Gct OEM namespaces. Aggressive crawl pruning is enabled +// only for the G894/HGX accelerator topology observed on B300 systems. +func gigaAST2600Profile() Profile { + return staticProfile{ + name: "giga-ast2600", + priority: 110, // apply platform-specific overrides after generic/HGX tuning + safeForFallback: false, + matchFn: func(s MatchSignals) int { + isGiga := isGigaManufacturer(s.SystemManufacturer) || isGigaManufacturer(s.ChassisManufacturer) + hasGigaOEM := false + for _, namespace := range s.OEMNamespaces { + if strings.EqualFold(strings.TrimSpace(namespace), "Gbt") || strings.EqualFold(strings.TrimSpace(namespace), "Gct") { + hasGigaOEM = true + break + } + } + if isGiga && hasGigaOEM { + return 100 + } + return 0 + }, + extendAcquisition: func(plan *AcquisitionPlan, signals MatchSignals) { + addPlanNote(plan, "giga ast2600 Redfish profile enabled") + if !isGigaB300Topology(signals) { + return + } + + // These branches are linked from the service/component roots but contain + // security state, telemetry histories, fabric counters, or actions. They + // are not inputs to normalized hardware inventory. On G894 they accounted + // for more than 1,300 saved documents and hundreds of additional requests. + ensureSnapshotExcludeContains(plan, + "/Fabrics", + "/TrustedComponents", + "/ComponentIntegrity", + "/Certificates", + "/Oem/NvidiaRoT/RoTProtectedComponents", + "/Oem/Nvidia/Histograms", + "/EnvironmentMetrics", + "/MemoryMetrics", + "/ProcessorMetrics", + "/SwitchMetrics", + "/Metrics", + "/Actions/", + "/CompositionService", + "/TelemetryService", + "/JobService", + "/LogServices/DebugTokenService", + ) + + // The AST2600 guide specifies collection Members. The G894 dump confirms + // that numeric probing of empty collections is both unnecessary and the + // main source of the 30-minute runtime. Trust advertised members for this + // topology and retain ordinary retry of explicitly advertised members. + plan.Tuning.SnapshotMaxDocuments = 12000 + plan.Tuning.PostProbePolicy.EnableNumericCollectionProbe = false + plan.Tuning.PostProbePolicy.EnableSensorCollectionProbe = false + plan.Tuning.RecoveryPolicy.EnableCriticalSlowProbe = false + plan.Tuning.RecoveryPolicy.EnableEmptyCriticalCollectionRetry = false + plan.Tuning.RecoveryPolicy.EnableProfilePlanB = false + plan.Tuning.ETABaseline = AcquisitionETABaseline{ + DiscoverySeconds: 15, + SnapshotSeconds: 180, + PrefetchSeconds: 25, + CriticalPlanBSeconds: 30, + ProfilePlanBSeconds: 0, + } + addPlanNote(plan, "giga b300 bounded inventory walker enabled: fabric telemetry, security branches, numeric probes, and empty-collection plan-B disabled") + }, + refineAcquisition: func(resolved *ResolvedAcquisitionPlan, _ DiscoveredResources, signals MatchSignals) { + if !isGigaB300Topology(signals) { + return + } + resolved.SeedPaths = filterGigaB300PlanPaths(resolved.SeedPaths) + resolved.CriticalPaths = filterGigaB300PlanPaths(resolved.CriticalPaths) + resolved.Plan.SeedPaths = filterGigaB300PlanPaths(resolved.Plan.SeedPaths) + resolved.Plan.CriticalPaths = filterGigaB300PlanPaths(resolved.Plan.CriticalPaths) + resolved.Plan.PlanBPaths = filterGigaB300PlanPaths(resolved.Plan.PlanBPaths) + }, + applyAnalysisDirectives: func(d *AnalysisDirectives, _ MatchSignals) { + d.EnableGenericGraphicsControllerDedup = true + d.EnableStorageEnclosureRecovery = true + }, + } +} + +func isGigaManufacturer(value string) bool { + value = strings.ToLower(strings.TrimSpace(value)) + return strings.Contains(value, "giga computing") || strings.Contains(value, "gigabyte") +} + +func isGigaB300Topology(signals MatchSignals) bool { + if containsFold(signals.SystemModel, "g894") || containsFold(signals.SystemModel, "b300") || + containsFold(signals.ChassisModel, "g894") || containsFold(signals.ChassisModel, "b300") { + return true + } + for _, hint := range append(append([]string{}, signals.ResourceHints...), signals.DocHints...) { + if containsFold(hint, "/systems/hgx_baseboard_") || containsFold(hint, "b300") { + return true + } + } + return false +} + +func filterGigaB300PlanPaths(paths []string) []string { + if len(paths) == 0 { + return nil + } + out := make([]string, 0, len(paths)) + for _, rawPath := range paths { + path := normalizePath(rawPath) + if path == "" || gigaB300PlanPathIsNoise(path) { + continue + } + if root, suffix := gigaB300ResourceRoot(path, "/redfish/v1/Systems/HGX_Baseboard_"); root != "" { + switch { + case suffix == "", suffix == "/Processors", suffix == "/Memory": + out = append(out, path) + } + continue + } + if root, suffix := gigaB300ResourceRoot(path, "/redfish/v1/Chassis/HGX_"); root != "" { + // Component root documents advertise their real supported children. + // Do not seed generic guessed suffixes on every HGX sub-chassis. + if suffix == "" { + out = append(out, path) + } + continue + } + out = append(out, path) + } + return dedupeSorted(out) +} + +func gigaB300PlanPathIsNoise(path string) bool { + for _, fragment := range []string{ + "/Fabrics", + "/TrustedComponents", + "/ComponentIntegrity", + "/Certificates", + "/Oem/NvidiaRoT/RoTProtectedComponents", + "/Oem/Nvidia/Histograms", + "/Metrics", + "/Actions/", + "/CompositionService", + "/TelemetryService", + "/JobService", + "/LogServices/DebugTokenService", + } { + if strings.Contains(path, fragment) { + return true + } + } + return false +} + +func gigaB300ResourceRoot(path, prefix string) (string, string) { + if !strings.HasPrefix(path, prefix) { + return "", "" + } + rest := strings.TrimPrefix(path, prefix) + if rest == "" { + return "", "" + } + if idx := strings.IndexByte(rest, '/'); idx >= 0 { + root := prefix + rest[:idx] + return root, strings.TrimPrefix(path, root) + } + return path, "" +} diff --git a/internal/collector/redfishprofile/profile_supermicro.go b/internal/collector/redfishprofile/profile_supermicro.go index 2fa03f0..04e65c5 100644 --- a/internal/collector/redfishprofile/profile_supermicro.go +++ b/internal/collector/redfishprofile/profile_supermicro.go @@ -7,13 +7,18 @@ func supermicroProfile() Profile { safeForFallback: true, matchFn: func(s MatchSignals) int { score := 0 - if containsFold(s.SystemManufacturer, "supermicro") || containsFold(s.ChassisManufacturer, "supermicro") { + isSupermicro := containsFold(s.SystemManufacturer, "supermicro") || containsFold(s.ChassisManufacturer, "supermicro") + if isSupermicro { score += 80 } - for _, hint := range s.ResourceHints { - if containsFold(hint, "hgx_baseboard") || containsFold(hint, "hgx_gpu_sxm") { - score += 20 - break + // HGX resource names describe an NVIDIA topology, not the server vendor. + // Only use them to strengthen an already established Supermicro match. + if isSupermicro { + for _, hint := range s.ResourceHints { + if containsFold(hint, "hgx_baseboard") || containsFold(hint, "hgx_gpu_sxm") { + score += 20 + break + } } } return min(score, 100) diff --git a/internal/collector/redfishprofile/profiles_common.go b/internal/collector/redfishprofile/profiles_common.go index ac7efc8..fa09826 100644 --- a/internal/collector/redfishprofile/profiles_common.go +++ b/internal/collector/redfishprofile/profiles_common.go @@ -60,6 +60,7 @@ func BuiltinProfiles() []Profile { inspurGroupOEMPlatformsProfile(), hgxProfile(), xfusionProfile(), + gigaAST2600Profile(), } } diff --git a/internal/collector/redfishprofile/signals.go b/internal/collector/redfishprofile/signals.go index 9ea9eae..331505d 100644 --- a/internal/collector/redfishprofile/signals.go +++ b/internal/collector/redfishprofile/signals.go @@ -56,6 +56,18 @@ func CollectSignalsFromTree(tree map[string]interface{}) MatchSignals { systemPath := memberPath("/redfish/v1/Systems", "/redfish/v1/Systems/1") chassisPath := memberPath("/redfish/v1/Chassis", "/redfish/v1/Chassis/1") managerPath := memberPath("/redfish/v1/Managers", "/redfish/v1/Managers/1") + // Composed accelerator platforms can list their HGX baseboard before the + // physical host. Prefer the conventional Self resources for vendor/profile + // identity when they exist, while retaining first-member fallback elsewhere. + if len(getDoc("/redfish/v1/Systems/Self")) != 0 { + systemPath = "/redfish/v1/Systems/Self" + } + if len(getDoc("/redfish/v1/Chassis/Self")) != 0 { + chassisPath = "/redfish/v1/Chassis/Self" + } + if len(getDoc("/redfish/v1/Managers/Self")) != 0 { + managerPath = "/redfish/v1/Managers/Self" + } resourceHints := make([]string, 0, len(tree)) hintDocs := make([]map[string]interface{}, 0, len(tree)) diff --git a/internal/collector/redfishprofile/testdata/giga-g894-b300.json b/internal/collector/redfishprofile/testdata/giga-g894-b300.json new file mode 100644 index 0000000..564e386 --- /dev/null +++ b/internal/collector/redfishprofile/testdata/giga-g894-b300.json @@ -0,0 +1,22 @@ +{ + "ServiceRootVendor": "AMI", + "ServiceRootProduct": "AMI Redfish Server", + "SystemManufacturer": "Giga Computing", + "SystemModel": "G894-SD3-AAX7-000", + "SystemSKU": "1783654831", + "ChassisManufacturer": "Giga Computing", + "ChassisModel": "G894-SD3-AAX7-000", + "ManagerManufacturer": "", + "OEMNamespaces": ["Ami", "Gbt", "Gct", "GBTChassisOemProperty"], + "ResourceHints": [ + "/redfish/v1/Systems/Self", + "/redfish/v1/Systems/HGX_Baseboard_0", + "/redfish/v1/Chassis/Self", + "/redfish/v1/Chassis/HGX_GPU_0", + "/redfish/v1/Managers/Self" + ], + "DocHints": [ + "#GBTSystemsOemProperty.v1_0_0.GBTSystemsOemProperty", + "NVIDIA B300 SXM6 AC" + ] +}