Conversation
Having cluster name with spaces in the context of a leaf node could cause problems when a subscription on the leaf node would be propagated in the cluster's hub. Since when a gateway is specified the name of the gateway needs to match the name of the cluster, the restriction of "no spaces" is added to gateway name. Finally, in the case of the leafnode, if no cluster name is specified the server name is used, so also applying the restriction to the server name. Resolves #5633 Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Member
|
My one concern is that this could break existing deployments since this adds a new constraint (in terms of rolling upgrade and servers failing to start). If even names have spaces, there may be deployments where the unintended behavior is not observed. The question is whether the risk qualifies for inclusive into a 2.10.x patch or we kick to 2.11 with a note on the new constraint? |
Member
Author
|
@bruth So what do we do? We could limit this PR to simply reject incoming LEAF that send a cluster name with spaces, but don't have the other code/checks. It could still "break" deployments in that leaf nodes that used to be able to connect to a hub may now fail, but again, the issue with the spaces would cause the hub some issues too. |
ReubenMathew
added a commit
to nats-io/natscli
that referenced
this pull request
Jul 25, 2024
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <reuben@nats.io>
ReubenMathew
added a commit
to nats-io/natscli
that referenced
this pull request
Jul 25, 2024
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <reuben@nats.io>
ReubenMathew
added a commit
to nats-io/natscli
that referenced
this pull request
Jul 25, 2024
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <reuben@nats.io>
ReubenMathew
added a commit
to nats-io/natscli
that referenced
this pull request
Jul 25, 2024
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <reuben@nats.io>
ReubenMathew
added a commit
to nats-io/natscli
that referenced
this pull request
Jul 26, 2024
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <reuben@nats.io>
ReubenMathew
added a commit
to nats-io/natscli
that referenced
this pull request
Jul 26, 2024
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <reuben@nats.io>
ReubenMathew
added a commit
to nats-io/natscli
that referenced
this pull request
Jul 26, 2024
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <reuben@nats.io>
ReubenMathew
added a commit
to nats-io/natscli
that referenced
this pull request
Jul 26, 2024
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <reuben@nats.io>
ReubenMathew
added a commit
to nats-io/natscli
that referenced
this pull request
Jul 26, 2024
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <reuben@nats.io>
ReubenMathew
added a commit
to nats-io/natscli
that referenced
this pull request
Jul 26, 2024
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <reuben@nats.io>
ripienaar
pushed a commit
to nats-io/natscli
that referenced
this pull request
Jul 26, 2024
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <reuben@nats.io>
ripienaar
pushed a commit
to ripienaar/jsm.go
that referenced
this pull request
Jan 1, 2025
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <reuben@nats.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Having cluster name with spaces in the context of a leaf node could cause problems when a subscription on the leaf node would be propagated in the cluster's hub.
Since when a gateway is specified the name of the gateway needs to match the name of the cluster, the restriction of "no spaces" is added to gateway name.
Finally, in the case of the leafnode, if no cluster name is specified the server name is used, so also applying the restriction to the server name.
Resolves #5633
Signed-off-by: Ivan Kozlovic ivan@synadia.com