Caught up is an equality, not an ordering
The report carries the digest of the declaration it applied (mesh-host 8211d8b), and the mesh stores it beside the outcome. `reported` rows in the status JSON now say `current`: whether the machine's last word names the declaration last sent. Not derivable from the timestamps beside it, which is why they were not enough: an apply begun under the previous declaration reports after the next send — newer, and still about the old words. The lab lost exactly that race between one test's closing push and the next test's opening one. Empty digests — every host from before reports carried one — read as not current, which errs toward waiting rather than toward asserting on files that are not there yet.
This commit is contained in:
@@ -155,9 +155,10 @@ func (e Enrolment) Heard(ctx context.Context, report Report) error {
|
||||
// last_seen and the reason went to a log line, so "which machine is not doing what it was
|
||||
// told" had no answer the next morning — which is the question a mesh exists to answer.
|
||||
doing := inventory.Doing{
|
||||
Outcome: inventory.OutcomeApplied,
|
||||
Refused: report.Refused,
|
||||
Applied: len(report.Applied),
|
||||
Outcome: inventory.OutcomeApplied,
|
||||
Refused: report.Refused,
|
||||
Applied: len(report.Applied),
|
||||
Declared: report.Declared,
|
||||
}
|
||||
switch {
|
||||
case report.Refused != "":
|
||||
|
||||
Reference in New Issue
Block a user