-
Notifications
You must be signed in to change notification settings - Fork 686
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
Use new node_names query param for voting exclusions as of 7.8.0 #3950
Conversation
The new query parameter tolerates non-existing nodes and covers therefore the case where we try to remove a master node that has never successfully joined the cluster. This prevents and orchestration dead lock where the operator was previously unable to make progress due to an API error returned by Elasticsearch.
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.
LGTM
if c.version.IsSameOrAfter(version.From(7, 8, 0)) { | ||
path = fmt.Sprintf("/_cluster/voting_config_exclusions?node_names=%s", strings.Join(nodeNames, ",")) | ||
} else { | ||
path = fmt.Sprintf("/_cluster/voting_config_exclusions/%s", strings.Join(nodeNames, ",")) |
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.
If c.version
is empty (client constructed from client.NewElasticsearchClient()
), we end up in this else
path, which is fine.
Maybe worth explicitly pointing out in a comment though?
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.
Not sure I follow your argument wrt to client.NewElasticsearchClient()
but I added a comment.
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.
I meant client which do not have a version set, which I think is the case when built from client.NewElasticsearchClient()
.
I'm 👍 with the comment.
if c.version.IsSameOrAfter(version.From(7, 8, 0)) { | ||
path = fmt.Sprintf("/_cluster/voting_config_exclusions?node_names=%s", strings.Join(nodeNames, ",")) | ||
} else { | ||
path = fmt.Sprintf("/_cluster/voting_config_exclusions/%s", strings.Join(nodeNames, ",")) |
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.
I meant client which do not have a version set, which I think is the case when built from client.NewElasticsearchClient()
.
I'm 👍 with the comment.
…stic#3950) The new query parameter tolerates non-existing node names and covers therefore the case where we try to remove a master node that has never successfully joined the cluster. This prevents an orchestration deadlock where the operator was previously unable to make progress due to an API error returned by Elasticsearch.
…) (#3954) The new query parameter tolerates non-existing node names and covers therefore the case where we try to remove a master node that has never successfully joined the cluster. This prevents an orchestration deadlock where the operator was previously unable to make progress due to an API error returned by Elasticsearch.
The new query parameter tolerates non-existing nodes and covers therefore the case where we try to remove a master node that has never successfully joined the cluster. This prevents an orchestration dead lock where the operator was previously unable to make progress due to an API error returned by Elasticsearch for nodes that were not part of the cluster.
Fixes #2951