internal/natscluster, internal/sysobs, docs: a NatsCluster whose servers may hold a JetStream meta group of their own is not joined to a supercluster's #60
No reviewers
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!60
Loading…
Reference in a new issue
No description provided.
Delete branch "mikluko/octant/2403-meta-join"
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?
Issue #51, octant X2403. Q2402 found the cause: a joining NATS cluster's own JetStream meta log. Two meta groups that meet over a gateway do not merge, and the side that loses deletes every stream the winner's snapshot does not list (
jetstream_cluster.go:2413-2418). A store that starts empty joins cleanly. This PR is for the maintainer to rule on. It builds the refusal and leaves out the JetStream hold that Q2402 recommended. The reason is under "Not built".What it does
A
NatsClusterwithjetstream, nojetstream.domainand a remote other than itself is held at its last render, withProgressing=False, in three cases:OwnMetaGroup, retained claims: a server about to be created has a data volume claim older than theNatsCluster, for example one left behind by an earlierNatsClusterof the same name. No server is created. This is the likeliest way the reporter'snewended up with a log.OwnMetaGroup, running servers: the render would change a running server's gateway remote names, its domain or whether it runs JetStream, while the snapshot shows a meta group led by a server of this NATS cluster that lists no peer outside it. To tell these apart,sysobs.Groupgains anOutsidefield, filled from the leader'smeta_cluster.replicas.ObservationFailed: the same kind of change, but the servers cannot be judged. Either the snapshot is missing, a server that would change is silent, or the leader is one of this cluster's servers and its peer list was not read.The message names the claims or the servers, and both ways out: delete the claims, or set a domain. To make the check before anything is created, the observation in
reconcilenow runs before server creation. That function is shared with the sibling tickets.Costs
NatsClusterthat holds streams and grows into a supercluster by listing a new member is refused as well. From its own side, a fresh remote looks the same as one that has a log. The way out today is a domain, or a wipe.NatsCluster.Not built: JetStream off until
GatewaysConnectedTestJetStreamEnabledAfterGateways_Liveshows that after a reload, west joins east's meta group and east's stream stays intact, but placing a stream on west fails for an account the server already held. After a restart it works. Sojetstreamstays restart-only in the allow-list, and the allow-list doc now says why.rollout.go.Verification
TestReconcile_OwnMetaGroupandTestReconcile_ClaimOlderThanNatsCluster.TestMetaJoinHold_Live:just test,just envtest,just lint,just verifyandjust site-checkpass. Story 13's steps are unchanged, so its e2e runs as before.The design (section 4.3), story 13 and the changelog are updated.