A machine waiting to be enrolled is not a broken one
The launcher already ran `host run`, and `run` on a machine with no identity exited with an error. So a freshly installed host, sitting exactly as intended waiting for somebody to bring it a token, would have counted three failed starts and rolled back its own installation. It waits now, and says what it is waiting for. That is the *hosted* state from the lifecycle: the host is running, it has no identity, and there is nobody to link to. Every machine passes through it. An identity that exists and cannot be read is still a fault rather than a wait. Treating that as "not enrolled yet" would leave a node sitting quietly for ever while the mesh believes it is a member. Also: a node now says it is there once a minute. Nothing but its name, because anything more would be a report, and reports are rare where this is constant -- reading one as the other would make a quiet node look like a stale one. Not published mandatory, unlike a report: losing one is nothing, the next is a minute away, and the mesh reads a gap rather than counting arrivals. Verified in the lab: a node was stopped and the mesh said "out of touch 4m", then it was started and the mesh said "here" again, without anything else being touched.
This commit is contained in:
@@ -8,8 +8,22 @@ package link
|
||||
// queue, so it can say these things and nothing else.
|
||||
const (
|
||||
KeyReport = "report"
|
||||
KeyAlive = "alive"
|
||||
)
|
||||
|
||||
// Alive is a node saying nothing except that it is there.
|
||||
//
|
||||
// novox/hq 09-the-node-lifecycle: *how long it has been disconnected is a fact the mesh must
|
||||
// hold, and nothing holds it today. Without it, a node running last month's assignments looks
|
||||
// exactly like one that is current.*
|
||||
//
|
||||
// Separate from a report because the two happen at completely different rates: a node is alive
|
||||
// constantly and applies something rarely, and reading one as the other would make a quiet node
|
||||
// look like a stale one.
|
||||
type Alive struct {
|
||||
Node string `json:"node"`
|
||||
}
|
||||
|
||||
// Signed is a declaration and the signature over it.
|
||||
//
|
||||
// novox/hq ADR 0004: the transport is verified once at connect, and **each declaration is
|
||||
|
||||
Reference in New Issue
Block a user