Topology mapped one NUMA node per CPU, so on a 2-socket SNC2 host (nodes 0-3) node 1 went to CPU1 and nodes 2-3 got no CPU: the second BlueField-3, four GPUs and several NICs rendered unattached. Use numa-nodes.txt (node=N package=P), now carried by parser v26 as TopologyEvidence.NUMANodes; without it, fall back to contiguous per-socket blocks of zero-based node ids. Pin parser v26.0.0. ADL-082. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
43 lines
1004 B
Go
43 lines
1004 B
Go
package collector
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"git.mchus.pro/reanimator/parser/v26/models"
|
|
)
|
|
|
|
type IPMIMockConnector struct{}
|
|
|
|
func NewIPMIMockConnector() *IPMIMockConnector {
|
|
return &IPMIMockConnector{}
|
|
}
|
|
|
|
func (c *IPMIMockConnector) Protocol() string {
|
|
return "ipmi"
|
|
}
|
|
|
|
func (c *IPMIMockConnector) Collect(ctx context.Context, req Request, emit ProgressFn) (*models.AnalysisResult, error) {
|
|
steps := []Progress{
|
|
{Status: "running", Progress: 20, Message: "IPMI: connecting to BMC..."},
|
|
{Status: "running", Progress: 55, Message: "IPMI: reading inventory..."},
|
|
{Status: "running", Progress: 85, Message: "IPMI: normalizing data..."},
|
|
}
|
|
|
|
for _, step := range steps {
|
|
if !sleepWithContext(ctx, 150*time.Millisecond) {
|
|
return nil, ctx.Err()
|
|
}
|
|
if emit != nil {
|
|
emit(step)
|
|
}
|
|
}
|
|
|
|
return &models.AnalysisResult{
|
|
Events: make([]models.Event, 0),
|
|
FRU: make([]models.FRUInfo, 0),
|
|
Sensors: make([]models.SensorReading, 0),
|
|
Hardware: &models.HardwareConfig{},
|
|
}, nil
|
|
}
|