The mesh knows which host runs a machine, and says who is behind another
novox/hq 04-ISSUES/087. A host refuses a declaration carrying a field it does not know, and refuses it WHOLE — deliberately, because that keeps a half-understood declaration off a machine. It makes every new declaration field a flag day: hosts first, then the controller. The mesh had no record of which host any machine ran, so that order was kept by somebody remembering it, and a machine that refused for this reason reported a failure with nothing saying why. The machine has reported its host version since ADR 0141. The controller's own copy of the report did not have the field, so it was unmarshalled into nothing and thrown away on arrival. It has it now, records it, and shows it in `node show` — "not reported" rather than blank, because a machine that has not said is not a machine running nothing. Status says which machines run an older host than another machine does, and which is newest. Deliberately disagreement rather than staleness: nothing delivers a host version yet (ADR 0141, accepted and not built), so the mesh holds no canonical current version and cannot honestly say a machine is behind THE host. What it can say is that the oldest host in the mesh is what the mesh may send. A machine that has reported nothing is left out rather than called behind. Versions compare as strings, which suits the timestamps and commits this mesh uses and is wrong for a scheme where "10" sorts before "9" — said in the code, at the place that would have to learn.
This commit is contained in:
@@ -312,6 +312,14 @@ func (e Enrolment) Heard(ctx context.Context, report Report) (news bool, err err
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
// Which host produced this report (novox/hq 04-ISSUES/087), whenever it says. Recorded on every
|
||||
// report that carries it and never cleared by one that does not — a bare word that the node is
|
||||
// there says nothing about its host, and a machine whose host predates this reports none.
|
||||
if report.Host != "" {
|
||||
if err := e.Inventory.RecordHostVersion(ctx, node.ID, report.Host); err != nil {
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
// What it says about the tunnel it carried (novox/hq ADR 0105), whenever it says it.
|
||||
if report.Tunnel != nil {
|
||||
if err := e.Inventory.RecordCarriedTunnel(ctx, node.ID, inventory.Carried{
|
||||
|
||||
Reference in New Issue
Block a user