-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Bring back config join URLs #2201
Merged
Merged
Conversation
This file contains 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
Don't forget the CHANGELOG. |
type Initialization struct { | ||
// JoinURLs are cluster URLs to use when joining a node to a cluster the first time it boots. After, | ||
// a node is joined to a cluster, these URLS are ignored. These will be overriden at runtime if | ||
// the node is started witha `-join` flag. |
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.
Nit: witha -> with a
Makes sense, some minor feedback that should be addressed before commit. +1 |
jwilder
added a commit
that referenced
this pull request
Apr 8, 2015
Removing this option causes issues when deploying influxd via configuration management. We can now define the same set of join URLs in the config file across nodes. This also ensures that the `-flag` option overrides the config file setting if passed.
Command-line options can be set in /etc/default/influxdb using the INFLUXD_OPTS env var.
3 was fairly arbitrary and would cause errors such as: 2015/04/08 14:01:12 join: failed to connect data node: {http <nil> influxdb.local:8191 }: unable to join 2015/04/08 14:01:12 join: failed to connect data node to any specified server in the tests. This can happen when the nodes are slow to startup. The limit is set arbitarily higher to avoid this error but still give up if it can't connect after a minute.
If the node is running a broker and a data node, always have the data node client connect to the local broker since it will already be initialized or joined.
Make it more explicit when existing cluster state is being used versus join URLs. Also consolidate some duplicated `if index==0` checks.
2015/04/08 22:27:01 no broker or server configured to handle messaging endpoints 2015/04/08 22:27:02 join: failed to connect data node: http://box296:9012: unable to join 2015/04/08 22:27:02 join: failed to connect data node to any specified server There is a race when joining a data only node to a broker and another data only node between the data node heartbeater and the join operation. If the heartbeater fire before the join attempt, it's possible for the booting data node to be selected as the first data node for redirection by the broker. The join attempt would request a data node endpoint on the broker "/data_nodes" but since the broker cannot handle it, it would redirect to a valid broker. During this race, the broker would redirect the request back to the same server. If this happens, the data node would get stuck and not be able to join because it's still booting. To work around this, the redirect is randonmized and the join calls will not attempt to call itself and instead re-request the original URL. A better fix might be to not start the heartbeater until after the datanode has joined or initialized.
mark-rushakoff
pushed a commit
that referenced
this pull request
Jan 11, 2019
Update from function example to bucket_name instead of telegraf/autogen
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.
This PR does the following:
[Initialization].join-urls
which were removed as part of Separate broker and data nodes #2175-join
flag so it will override the config filejoin-urls
when passed but not when the node has already joined a cluster.