platform: mirror per-drive disk reports into techdump
Storage acceptance runs already write disk-<prefix>-report.txt (per-drive health + pseudographic resource bars) into the timestamped bee-sat run dir. Also mirror it into techdump, a sibling of baseDir under the same export dir, so a support bundle surfaces these reports alongside the rest of the diagnostics without anyone having to dig into a specific bee-sat run dir. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
b30d34199a
commit
c1f0f7824e
@@ -718,6 +718,15 @@ func (s *System) RunStorageAcceptancePack(ctx context.Context, baseDir string, e
|
||||
}
|
||||
sort.Strings(devices)
|
||||
|
||||
// Disk reports (per-drive health + pseudographic resource bars) are also
|
||||
// mirrored into techdump, a sibling of baseDir under the same export dir,
|
||||
// so support bundles surface them alongside the rest of the diagnostics
|
||||
// without requiring anyone to dig into a timestamped bee-sat run dir.
|
||||
techDumpDir := filepath.Join(filepath.Dir(baseDir), "techdump")
|
||||
if err := os.MkdirAll(techDumpDir, 0755); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
var summary strings.Builder
|
||||
stats := satStats{}
|
||||
fmt.Fprintf(&summary, "run_at_utc=%s\n", time.Now().UTC().Format(time.RFC3339))
|
||||
@@ -771,7 +780,9 @@ func (s *System) RunStorageAcceptancePack(ctx context.Context, baseDir string, e
|
||||
}
|
||||
}
|
||||
reportText := GenerateDiskReportText(index+1, devPath, deviceOutputs, time.Now().UTC())
|
||||
_ = os.WriteFile(filepath.Join(runDir, "disk-"+prefix+"-report.txt"), []byte(reportText), 0644)
|
||||
reportName := "disk-" + prefix + "-report.txt"
|
||||
_ = os.WriteFile(filepath.Join(runDir, reportName), []byte(reportText), 0644)
|
||||
_ = os.WriteFile(filepath.Join(techDumpDir, reportName), []byte(reportText), 0644)
|
||||
}
|
||||
|
||||
writeSATStats(&summary, stats)
|
||||
|
||||
Reference in New Issue
Block a user