Say every failed unit, the module's and the machine's (hq issue 315)
mesh/merge-gate pass: builds mesh-host → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
mesh/delivery-group group fix/315-a-failed-unit-is-a-condition delivered: every member is delivered
mesh/merge-gate pass: builds mesh-host → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
mesh/delivery-group group fix/315-a-failed-unit-is-a-condition delivered: every member is delivered
Liveness judged only what a module runs long-lived, so a module whose daemon is a package's unit started by D-Bus activation failed at every start while its machine read healthy, and a degraded service manager was said by nothing but the profile. The engine now reads the failed units of the machine's manager and of every account manager the declaration names, on the two-look rule, and says whose each is: a declared service or process, a unit file the mesh writes, or a package the mesh installs makes it that module's, said as an unhealthy resource of kind unit; anything else is the machine's own, said in the statement's new units field. It reads; it never acts.
This commit is contained in:
@@ -242,6 +242,41 @@ type Health struct {
|
||||
// file, its names, its tunnel, its bus and its route. Absent from an engine older than that judging,
|
||||
// which the controller reads as "not known", never as healthy.
|
||||
Network *NetworkHealth `json:"network,omitempty"`
|
||||
// Units is the machine's service managers as its engine read them (novox/hq issue 315): whether any
|
||||
// unit failed, and each failed unit no module places. A failed unit a module states, writes or
|
||||
// installs is said among Resources instead, as that module's, of kind KindUnit. Absent from an engine
|
||||
// older than that reading, which the controller reads as "not known", never as healthy.
|
||||
Units *UnitsHealth `json:"units,omitempty"`
|
||||
}
|
||||
|
||||
// KindUnit is a module's unit its service manager says failed (issue 315): a resource of the module
|
||||
// that is not long-running, or not stated running — a package's unit, a unit file the mesh wrote, a
|
||||
// service whose lifecycle is the machine's — said unhealthy for as long as it stays failed.
|
||||
const KindUnit = "unit"
|
||||
|
||||
// UnitsHealth is the machine's service managers in one statement (issue 315).
|
||||
type UnitsHealth struct {
|
||||
// State is running, degraded — a unit failed, the modules' or the machine's — or unknown when no
|
||||
// manager could be read.
|
||||
State string `json:"state"`
|
||||
// Failed is every unit failed on two looks in a row that no module places: the machine's own.
|
||||
Failed []FailedUnit `json:"failed"`
|
||||
// Unread names a manager that could not be read, with why.
|
||||
Unread []string `json:"unread,omitempty"`
|
||||
}
|
||||
|
||||
// FailedUnit is one failed unit no module places.
|
||||
type FailedUnit struct {
|
||||
Unit string `json:"unit"`
|
||||
// Scope is system, or user: an account's own manager.
|
||||
Scope string `json:"scope"`
|
||||
// Load is loaded, not-found — a unit whose file is gone and whose failure its manager still holds…
|
||||
Load string `json:"load,omitempty"`
|
||||
// Result is how it failed: exit-code, timeout, start-limit-hit…
|
||||
Result string `json:"result,omitempty"`
|
||||
// Resource is the mesh's own resource that names it, when the mesh placed it in its own right.
|
||||
Resource string `json:"resource,omitempty"`
|
||||
Since time.Time `json:"since"`
|
||||
}
|
||||
|
||||
// NetworkHealth is the machine's networking in one statement (ADR 0241): the worst of its parts, since
|
||||
|
||||
Reference in New Issue
Block a user