A failure that repeats is said to be stuck

The mesh kept one report per machine, replaced, so a resource nothing can ever apply
looked like a failure that had just happened, every reconcile interval, for ever.
The row now keeps when the current failure began and how many reports in a row have
said it — the same outcome, refusal and failed resources; anything different starts
again and a clean apply clears it. Three make the machine stuck, and status says so
beside the failure, in words and in JSON (novox/hq 04-ISSUES/065, ADR 0090).
This commit is contained in:
2026-09-21 17:43:24 +02:00
parent 69d0b94395
commit fcaad7271a
6 changed files with 183 additions and 8 deletions
+6
View File
@@ -75,6 +75,11 @@ type machineDoing struct {
} `json:"failed,omitempty"`
Applied int `json:"applied"`
At time.Time `json:"at"`
// Since is when this same failure was first reported and Times how many reports in a row
// have said it; Stuck is the mesh's word for "enough of them" (novox/hq 04-ISSUES/065).
Since *time.Time `json:"since,omitempty"`
Times int `json:"times"`
Stuck bool `json:"stuck"`
}
type machineReported struct {
@@ -149,6 +154,7 @@ func statusAsJSON(asked answers) ([]byte, error) {
for _, d := range wrong {
row := machineDoing{
Node: d.Node, Outcome: d.Outcome, Refused: d.Refused, Applied: d.Applied, At: d.At,
Since: d.Since, Times: d.Times, Stuck: d.Stuck(),
}
for _, f := range d.Failed {
row.Failed = append(row.Failed, struct {