feat: adaptive BMC readiness check + ghost NIC dedup fix + empty collection plan-B retry
BMC readiness after power-on (waitForStablePoweredOnHost): - After initial 1m stabilization, poll BMC inventory readiness before collecting - Ready if MemorySummary.TotalSystemMemoryGiB > 0 OR PCIeDevices.Members non-empty - On failure: wait +60s, retry; on second failure: wait +120s, retry; then warn and proceed - Configurable via LOGPILE_REDFISH_BMC_READY_WAITS (default: 60s,120s) Empty critical collection plan-B retry (EnableEmptyCriticalCollectionRetry): - Hardware inventory collections that returned Members=[] are now re-probed in plan-B - Covers PCIeDevices, NetworkAdapters, Processors, Drives, Storage, EthernetInterfaces - Enabled by default in generic profile (applies to all vendors) Ghost NIC dedup fix (enrichNICsFromNetworkInterfaces): - NetworkInterface entries (e.g. Id=2) that don't match existing NIC slots are now resolved via Links.NetworkAdapter cross-reference to the real Chassis NIC - Prevents duplicate ghost entries (slot=2 "Network Device View") from appearing alongside real NICs (slot="RISER 5 slot 1 (7)") with the same MAC addresses Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -272,6 +272,7 @@ func TestRedfishConnectorProbe(t *testing.T) {
|
||||
|
||||
func TestEnsureHostPowerForCollection_WaitsForStablePowerOn(t *testing.T) {
|
||||
t.Setenv("LOGPILE_REDFISH_POWERON_STABILIZATION", "1ms")
|
||||
t.Setenv("LOGPILE_REDFISH_BMC_READY_WAITS", "1ms,1ms")
|
||||
|
||||
powerState := "Off"
|
||||
resetCalls := 0
|
||||
@@ -282,6 +283,9 @@ func TestEnsureHostPowerForCollection_WaitsForStablePowerOn(t *testing.T) {
|
||||
_ = json.NewEncoder(w).Encode(map[string]interface{}{
|
||||
"@odata.id": "/redfish/v1/Systems/1",
|
||||
"PowerState": powerState,
|
||||
"MemorySummary": map[string]interface{}{
|
||||
"TotalSystemMemoryGiB": 128,
|
||||
},
|
||||
"Actions": map[string]interface{}{
|
||||
"#ComputerSystem.Reset": map[string]interface{}{
|
||||
"target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset",
|
||||
@@ -329,6 +333,7 @@ func TestEnsureHostPowerForCollection_WaitsForStablePowerOn(t *testing.T) {
|
||||
|
||||
func TestEnsureHostPowerForCollection_FailsIfHostDoesNotStayOnAfterStabilization(t *testing.T) {
|
||||
t.Setenv("LOGPILE_REDFISH_POWERON_STABILIZATION", "1ms")
|
||||
t.Setenv("LOGPILE_REDFISH_BMC_READY_WAITS", "1ms,1ms")
|
||||
|
||||
powerState := "Off"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user