-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NRG (2.11): Add ability to move cluster traffic into asset accounts #5466
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also expose this in $SYS.REQ.SERVER.PING.VARZ
? Be nice if nats server info
could easily show this.
Also in JSZ.
Might also be worth to ask @mprimi to get into audit a check that all machines have this enabled and alert if not symetrical
@ripienaar what's a good way to track requested/suggested checks and other improvements for @neilalexander I'm not familiar with this feature or the subsystems around it, however just from your description i have a comment/concern:
How about instead having the the cluster meta-leader is turning this on or off based on the same (ephemeral, possibly outdated) view? |
@mprimi you are welcome to open them here if you wish, add a label (or ask me) so you can find them easily |
IF a new server joins a cluster that is in this mode and actively all happy but that new node is not configured in this manner what happens? Can we make that node disable JetStream with a error in the logs? Is there any concerns with Leafnodes? |
I will try to take a look at this next week when I am back.. Will need to take my time. Do we have a plan for visibility into $SYS via |
b806546
to
f6b2099
Compare
@neilalexander let's sync this week on this one and get it merged. Agree we should be able to place in any account. |
5a8c26e
to
1f50821
Compare
3611289
to
76d570f
Compare
81bbac3
to
f4b966a
Compare
For supporting nats-io/nats-server#5466. For now expected values would be: * `"system"` - use the system account (default, as today) * `"owner"` - use the same account that owns the asset * `"account:ACCNAME"` - use a third specified `ACCNAME` Signed-off-by: Neil Twigg <[email protected]>
f4b966a
to
13ba3f0
Compare
13ba3f0
to
9479629
Compare
got a panic in one of the runs:
|
9479629
to
1cd4693
Compare
Panic fixed BTW. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are very close. Just a general question when we see a change, do we want to redo internal state of existing node or should we delete old node and create a new one with same name?
1cd4693
to
91d067f
Compare
For now have disabled being able to select a third account, so now limited to |
2070574
to
3b9d3b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - one nit but not a blocker.
This adds a new account NRG capability into statsz so that we can detect when all servers in the cluster support moving traffic into the asset account, instead of all being in the system account. Signed-off-by: Neil Twigg <[email protected]>
3b9d3b2
to
b38b039
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can pick up as needed in separate PR.
case "owner": | ||
a.js.nrgAccount = a.Name | ||
default: | ||
s.Errorf("Account claim for %q has invalid value %q for cluster traffic account", a.Name, ac.ClusterTraffic) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a PR for the validation of the JWT, if this is the case, the JWT can be validated after you decode. See nats-io/jwt#224
This PR adds the ability to move NRG traffic out of the system account and into the asset accounts. Particularly in heavily multi-tenanted systems, this can help cases where head-of-line blocking may happen in the system account due to large amounts of replication traffic.
This needs to be enabled on a per-account basis on each participating server. Servers advertise their capability to support account NRG to each other. If a Raft group detects a peer coming up without support, they will revert back to using the system account automatically.
Requires nats-io/jwt#223 and then
go.mod
updating.Signed-off-by: Neil Twigg [email protected]