feat(audit): capture IPMI FRU/Elabel, mc info and LAN on every audit
The techdump — the only place the IPMI FRU / Elabel identity (Product Name = server model, serials, part numbers) is recorded — only ran under LiveCD. Run it on every audit so `bee audit` on an installed host captures it too. Also add `ipmitool mc info` and `ipmitool lan print` to the techdump, and pin `ipmitool fru print 0` to FRU device 0 to match the Export Tools "FRU / Elabel" editor exactly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
319f08ac4b
commit
76db45ee95
@@ -7,6 +7,27 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestTechDumpCapturesIPMIIdentity(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
want := map[string][]string{
|
||||
"ipmitool-fru.txt": {"fru", "print", "0"},
|
||||
"ipmitool-mc-info.txt": {"mc", "info"},
|
||||
"ipmitool-lan-print.txt": {"lan", "print"},
|
||||
}
|
||||
for _, cmd := range techDumpFixedCommands {
|
||||
if args, ok := want[cmd.File]; ok {
|
||||
if cmd.Name != "ipmitool" || !reflect.DeepEqual(cmd.Args, args) {
|
||||
t.Fatalf("%s: got %s %v, want ipmitool %v", cmd.File, cmd.Name, cmd.Args, args)
|
||||
}
|
||||
delete(want, cmd.File)
|
||||
}
|
||||
}
|
||||
if len(want) != 0 {
|
||||
t.Fatalf("techdump missing IPMI identity captures: %v", want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLSBLKDumpDevices(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user