Skip to content

Conversation

MauriceVanVeen
Copy link
Member

cluster_traffic: owner can be used to have replication traffic go over the account "owning" the stream, versus this traffic going over the system account (cluster_traffic: system/default).

When pushing an updated JWT to all servers, all these servers would correctly update their cluster_traffic setting.

However, if a server was restarted it would "forget" cluster_traffic: owner was set, and revert back to cluster_traffic: system. This would put this single server to be unable to communicate with the remainder of the cluster. Restarting the rest of the cluster would have them also revert back to cluster_traffic: system, which would allow them to communicate again. But, without respecting the cluster_traffic: owner setting on the account.

This PR fixes that by ensuring cluster_traffic can be updated at the same time as that JetStream is enabled for that particular account upon startup.

Due to this issue, if a server with this fix is deployed, it will not be able to communicate with the other servers that had reverted back to cluster_traffic: system. A clean upgrade path for this would be:

  • Temporarily update the account to have cluster_traffic: system. If all servers were restarted they were already on this setting. Any servers that were not yet restarted will now agree on this setting.
  • Upgrade all servers to the new server version with this fix.
  • Update the account to have cluster_traffic: owner again. It should now be remembered even after a server restart.

Signed-off-by: Maurice van Veen github@mauricevanveen.com

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner August 21, 2025 08:00
Copy link
Member

@neilalexander neilalexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neilalexander neilalexander merged commit d034f64 into main Aug 21, 2025
90 of 92 checks passed
@neilalexander neilalexander deleted the maurice/traffic-owner-restart branch August 21, 2025 12:17
neilalexander added a commit that referenced this pull request Aug 22, 2025
Includes the following:

- #7189
- #7191
- #7193

Signed-off-by: Neil Twigg <neil@nats.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants