Judge apply-failing by the client's failing-since, so a failure said in new words is measured from when it began (issue 774)
mesh-provisioner-client's report now carries failing-since (mesh-catalog 3aae6c08), kept while a module
stays failed however its words change. S21 measures a failed placing from it, falling back to the
report's time from an older client; the hysteresis of 6ffcea4f (an open condition stays while any
failure stands) is kept. This is the thorough fix that commit named.
Research 072 piece: milestone 3 (health leaves the controller): the judgement reads the owner's state.
This commit is contained in:
@@ -26,6 +26,17 @@ type ProvReport struct {
|
||||
WaitsFor []string `json:"waits-for,omitempty"`
|
||||
Templates string `json:"templates,omitempty"`
|
||||
At time.Time `json:"at"`
|
||||
// FailingSince is, on a failed report, when the module's standing failure began, kept by the client while only its
|
||||
// words change (mesh-catalog 3aae6c08); zero from an older client.
|
||||
FailingSince time.Time `json:"failing-since,omitzero"`
|
||||
}
|
||||
|
||||
// Since is when a failed report's failure began: FailingSince when the client says it, else At.
|
||||
func (r ProvReport) Since() time.Time {
|
||||
if !r.FailingSince.IsZero() {
|
||||
return r.FailingSince
|
||||
}
|
||||
return r.At
|
||||
}
|
||||
|
||||
// The words a client's report says.
|
||||
|
||||
Reference in New Issue
Block a user