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

Do not set initial_master_nodes if cluster has been bootstrapped #1272

Merged
merged 5 commits into from
Jul 18, 2019

Conversation

barkbay
Copy link
Contributor

@barkbay barkbay commented Jul 17, 2019

This PR ensures that initial_master_nodes is not set once the cluster has been bootstrapped.

It is a partial fix for #1201

@barkbay barkbay added >bug Something isn't working v0.9.0 labels Jul 17, 2019
Copy link
Collaborator

@pebrc pebrc left a comment

Choose a reason for hiding this comment

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

Looks pretty good, only concern is the isBootstrapped method.

}

// no annotation, let see if the cluster has been bootstrapped by looking at it's UUID
if clusterState.ClusterState != nil && len(clusterState.ClusterState.ClusterUUID) > 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't like that isBootstrapped has the side effect of actually storing the cluster UUID on the ES resource.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since it is rather small I have inlined the function and make it explicit in the ClusterInitialMasterNodesEnforcer documentation.

@barkbay barkbay requested a review from pebrc July 18, 2019 06:49
@barkbay barkbay merged commit e2158c6 into elastic:master Jul 18, 2019
barkbay added a commit to barkbay/cloud-on-k8s that referenced this pull request Jul 18, 2019
…stic#1272)

* Do not set initial_master_nodes if cluster has been bootstrapped
barkbay added a commit that referenced this pull request Jul 18, 2019
* Do not set initial_master_nodes if cluster has been bootstrapped

* Backport of #1272
sebgl added a commit to sebgl/cloud-on-k8s that referenced this pull request Jul 19, 2019
This is a port of elastic#1272 in
the new code structure.
sebgl added a commit to sebgl/cloud-on-k8s that referenced this pull request Jul 24, 2019
This is a port of elastic#1272 in
the new code structure.
sebgl added a commit to sebgl/cloud-on-k8s that referenced this pull request Jul 31, 2019
This is a port of elastic#1272 in
the new code structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working v0.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants