Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

ensure nodes can only connect to clusters with the same clusterName #597

Merged
merged 1 commit into from
Apr 6, 2017

Conversation

woodsaj
Copy link
Member

@woodsaj woodsaj commented Apr 6, 2017

@woodsaj woodsaj requested review from Dieterbe and replay April 6, 2017 09:57
docs/config.md Outdated
@@ -226,6 +226,8 @@ net-max-open-requests = 100

```
[cluster]
# Unique name of the cluster.
Copy link
Contributor

Choose a reason for hiding this comment

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

Might want to mention in the comment that this name is used to make sure that only metrictanks with the same cluster name connect to each other. Otherwise it's kind of ambiguous what this setting is for.

Members []cluster.Node `json:"members"`
ClusterName string `json:"clusterName"`
NodeName string `json:"nodeName"`
Members []cluster.Node `json:"members"`
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming that currently the only purpose of this is to make the name queryable via /cluster

Copy link
Member Author

Choose a reason for hiding this comment

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

correct

Copy link
Contributor

@replay replay left a comment

Choose a reason for hiding this comment

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

LGTM with comments

- fixes #596
- add cluster "name" setting to the config
- use the clusterName as the security key with memberlist. This
  will prevent nodes from other clusters from connecting.
- expose the cluster name in the /cluster api method.
@woodsaj woodsaj merged commit 1c356e8 into master Apr 6, 2017
@woodsaj woodsaj deleted the issue596 branch April 6, 2017 20:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prevent nodes from connecting to clusters they dont belong to
2 participants