-
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
Cluster Setup #5706
Cluster Setup #5706
Conversation
@@ -1251,6 +1258,14 @@ func (e errRedirect) Error() string { | |||
return fmt.Sprintf("redirect to %s", e.host) | |||
} | |||
|
|||
type errCommand struct { |
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.
Is there a reason to make thing a struct instead of just an aliased type? type errCommand string
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.
No particular reason other than the error above did it this way: #5706 (diff)
Small nit but LGTM 👍
|
This fixes several issues related to the bind address and hostname: * Allows bind addresses where a hostname or IP is not specified to work correct and bind to all interfaces by default. * Fixes the top-level "hostname" config option to allow overridding all bind address hostnames. This allows a node to advertise a different hostname than what is defined in the bind address setting. * Adds the -hostname command-line option back to allow specifing both -join and -hostname as command-line flags. * Enforces a configuration precedence and overriding ability defined as config file is overridden by env vars which are overriden by command-line flags. Fixes #5670 #5671
Dropping a meta node that had already been removed from the config would fail because the raft.RemovePeers call would return an error that the address was unknown. This change skips calling RemovePeer if it doesn't exist. Dropping a non-existing ID would hang for 10 seconds becuase the meta.Client retryUntilExec didn't differentiate before command errors and redirect errors. In this case, the command would return an error but we'd try 10 more times and ultimately give up and return the error. We now return immediately if the command returned and error because retrying it will not succeed. Finally, the join loop had no delay and would immediately try to join the other nodes hundreds of times a second. We now pause a second if we've tried every node at least once.
This PR addresses most of the issues from #5673. Specifically, it changes the following:
bind-address = ":8088"
will now bind to all interfaces instead of justlocalhost
.hostname
config option to allow overriding all bind address hostnames. This allows a node to advertise a different hostname than what is defined in the bind address setting. For example, if the config isbind-address = ":8088"
andhostname = "influx1"
, the node will bind to all interfaces on port8088
and remote nodes will reach this node using the addressinflux1:8088
. If ahostname
is not specified, we default tolocalhost
for backwards compatibility. This may change toos.Hostname()
in the future if/when Add gossip protocol for determining node addresses #5672 is implemented.-hostname
command-line option back to allow specifying both-join
and-hostname
as command-line flags if desired.Config
used by the services and code.join
config file option back tometa
config. This allows join servers to be specified in a config files, via env vars, or command-line flags and ordering precedence is the same as-hostname
.Fixes #5669
@corylanou