A consumer a machine is bound to keeps the subject that works
novox/hq 04-ISSUES/156. Issue 146 put the stream into a push consumer's delivery subject. The server will not move that subject while a subscriber is bound, and answers `consumer name already in use` — a message about the name, for a conflict about the subject. A node is bound to its declaration consumer the whole time it is up: that IS a node listening. So every node consumer in a running mesh became one the assertion could not bring to match, and the control plane crash-looped on the assertion it makes before it serves. A fresh mesh showed nothing, because nothing was bound. Kept rather than deleted and re-made. Re-making moves the subject, and a holder may not be allowed to subscribe to the new one yet: the wider grant travels in the bus's user list, which this same control plane composes and a machine applies minutes later. On the live mesh the nodes are granted `_DELIVER.<node>` and not `_DELIVER.<node>.>`, so re-making would have silenced every machine — worse than the collision it fixes, and harder to undo. Kept rather than fatal, which is what 146's change intended and did not do. The bare subject still delivers, and collides only where one holder has two consumers of one name. That is the controller's own pair, and the controller is not bound to them while it asserts, so those do move. Also: an existing consumer's deliver policy is carried across rather than reasserted, because the server refuses to change it and where a consumer starts is its history. Two tests against a real server: a consumer with a subscriber bound keeps its subject, is reported, and still delivers; one with nothing bound moves, so 146's fix still applies where it matters.
This commit is contained in:
@@ -717,6 +717,12 @@ func raiseTheBus(ctx context.Context, inv *inventory.Inventory, address string)
|
||||
broker.BareAddress(address), err)
|
||||
}
|
||||
defer js.Close()
|
||||
// What the raise decided not to fail over. Said, for the reason everything else here is said:
|
||||
// a consumer kept as it was is a difference between what the mesh asked for and what the bus
|
||||
// holds, and one nobody would find by reading either (novox/hq 04-ISSUES/156).
|
||||
js.Note = func(format string, args ...any) {
|
||||
fmt.Printf(" "+format+"\n", args...)
|
||||
}
|
||||
|
||||
// **Its own user, before anything else.** The controller's account is created by the installer at
|
||||
// a bootstrap password, before there is a controller to mint one — so nothing recorded a hash for
|
||||
|
||||
Reference in New Issue
Block a user