hub: Restart controller (the agent's closed list on the host-report reply) and Clear hold (D64 = B, the controller's list) on the host page, each behind a confirm; controller_unresponsive (R-1344, alarm only); 04 §6.1 + 09 §3 decision 283; wire gate declares both new wires; R-1344 filed — tests red first
gates / gates (push) Successful in 3m23s
gates / gates (push) Successful in 3m23s
This commit is contained in:
1 parent
70862fa7b3
commit
3d0c907b56
20 files changed
+663
-20
No files matched your search
@@ -146,3 +146,32 @@ func TestControllerSupervisorChecker_SlowCrashloopAtFirstSight(t *testing.T) {
|
||||
t.Fatalf("first sight in a slow crash loop: got %v, want exactly [controller_slow_crashloop/warning]", evs)
|
||||
}
|
||||
}
|
||||
|
||||
// R-1344 (operator brief 2026-10-29, Part 2 — ALARM ONLY until the measurement licenses a restart): a controller that
|
||||
// runs but does not answer reaches the operator once per new unresponsive_since, as controller_unresponsive (warning),
|
||||
// also at first sight; an answering one never. RED-PROOF: seen failing before the branch existed.
|
||||
func TestControllerSupervisorChecker_Unresponsive(t *testing.T) {
|
||||
st := newCapStore(t)
|
||||
rec := &evRec{}
|
||||
c := NewControllerSupervisorChecker(st, rec.fn, log.New(io.Discard, "", 0))
|
||||
st.SaveHostReport("h1", "c1", supReport(`[{"vmid":9201,"restarts_total":0,"crashloop":false,"parked":false,"unresponsive":false}]`), store.HostReportDenorm{})
|
||||
c.Check()
|
||||
if evs := rec.take(); len(evs) != 0 {
|
||||
t.Fatalf("an answering controller emitted %v", evs)
|
||||
}
|
||||
st.SaveHostReport("h1", "c1", supReport(`[{"vmid":9201,"restarts_total":0,"crashloop":false,"parked":false,"unresponsive":true,"unresponsive_since":"2026-10-29T13:00:00Z"}]`), store.HostReportDenorm{})
|
||||
c.Check()
|
||||
if evs := rec.take(); len(evs) != 1 || evs[0] != "controller_unresponsive/warning" {
|
||||
t.Fatalf("got %v, want exactly [controller_unresponsive/warning]", evs)
|
||||
}
|
||||
c.Check()
|
||||
if evs := rec.take(); len(evs) != 0 {
|
||||
t.Fatalf("the same unresponsive_since emitted again: %v", evs)
|
||||
}
|
||||
// a hub restarted while it is unresponsive says so once
|
||||
c2 := NewControllerSupervisorChecker(st, rec.fn, log.New(io.Discard, "", 0))
|
||||
c2.Check()
|
||||
if evs := rec.take(); len(evs) != 1 || evs[0] != "controller_unresponsive/warning" {
|
||||
t.Fatalf("first sight while unresponsive: %v", evs)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user