A NatsCluster joining a supercluster founds its own JetStream meta group and can lead the supercluster's #51
Labels
No labels
accessibility
bug
dependencies
documentation
duplicate
enhancement
go
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/nats-operator#51
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
A
NatsClusterwith JetStream that joins an existing supercluster can become the meta leader of the whole supercluster while knowing only its own servers as peers.Its servers form a JetStream meta group of their own before any gateway connects, then bring that group's leader into the supercluster's.
Steps to reproduce
reject_unknownon every member.NatsClusternewwithjetstream,gateway.discovery: Explicitand every member ingateway.remotes.newto the gateway lists of the existing members.Observed with nats-operator 0.4.0 and nats-server 2.15.0.
What happens
Until the members list
new, they reject its gateways, so its three servers start isolated and elect a meta leader among themselves.Once the gateways connect, every server in the supercluster reports that leader, while the leader's view of the group holds four peers against the other servers' seventeen:
With four peers, three servers of
newmake a quorum on their own, so a cluster with no streams can commit metadata for the whole supercluster.Expected
A
NatsClusterjoining a supercluster joins its meta group rather than founding one.Some ways to get there:
NatsClusterwith bothjetstreamand gateway remotes and no JetStream domain, and document the order of steps in "Add a NATS cluster to a supercluster that you did not deploy".Workaround
Delete the
NatsClusterand the PersistentVolumeClaims of its servers, so that the remaining servers elect a meta leader among themselves.Fix proposed in #60, for review: a
NatsClusterwhose servers may already have a JetStream meta group of their own (a data claim older than theNatsCluster, or running servers leading a meta group with no peer outside their NATS cluster) is not joined to the supercluster's meta group by its gateway remotes; it readsProgressingFalse, reasonOwnMetaGroup.