Skip to content
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

[IMPROVED] Clustering: Report possible misconfiguration of peers list #1091

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

kozlovic
Copy link
Member

The clustering peers list is supposed to contain the list of peer
node ids. However, it happens that users make the mistake of listing
the node peer ids in the same string as such:

streaming {
  cluster {
    node_id: "a"
    peers: ["a, b, c"]
  }
}

The correct definition of peers should be:

   peers: ["a", "b", "c"]

The server will now list the cluster known peers on startup and
will print a warning if a comma is detected in a peer name:

[INF] STREAM: peer 1: "a,b,c"
[WRN] STREAM: Peer name contains ',' make sure you provided an array of peer names, not a string with commas

Resolves #990

Signed-off-by: Ivan Kozlovic ivan@synadia.com

The clustering peers list is supposed to contain the list of peer
node ids. However, it happens that users make the mistake of listing
the node peer ids in the same string as such:
```
streaming {
  cluster {
    node_id: "a"
    peers: ["a, b, c"]
  }
}
```
The correct definition of `peers` should be:
```
   peers: ["a", "b", "c"]
```

The server will now list the cluster known peers on startup and
will print a warning if a comma is detected in a peer name:
```
[INF] STREAM: peer 1: "a,b,c"
[WRN] STREAM: Peer name contains ',' make sure you provided an array of peer names, not a string with commas
```

Resolves #990

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.08%) to 91.749% when pulling 164f72f on fix_990 into 18cff06 on master.

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@kozlovic kozlovic merged commit d6f0466 into master Oct 6, 2020
@kozlovic kozlovic deleted the fix_990 branch October 6, 2020 20:04
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.

Nats cluster - nodes are talking, but election is not happening
3 participants