Power: say why a BMC command failed (CLI, UI); certificate changes are events
CI / agent (push) Successful in 2s
CI / site (push) Successful in 3s
CI / go (push) Successful in 40s

Found in the lab test of certificate pinning: the CLI printed only
'ipmitool failed on 1 machine(s)'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-29 22:37:02 +01:00
1 parent 9ab081aa5a
commit d0ea29d2a9
4 files changed
+21 -5

No files matched your search

+5 -1
View File
@@ -786,7 +786,11 @@ func (a *App) handlePower(w http.ResponseWriter, r *http.Request) {
if action != "status" {
_ = a.store.AddEvent(r.Context(), m.ID, "power "+action, out)
}
writeJSON(w, 200, obj{"id": m.ID, "action": action, "ok": err == nil, "output": out})
res := obj{"id": m.ID, "action": action, "ok": err == nil, "output": out}
if err != nil {
res["error"] = err.Error()
}
writeJSON(w, 200, res)
}
func (a *App) handleBootdev(w http.ResponseWriter, r *http.Request) {