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

Fix roles parsing in client nodes sniffer #52888

Merged
merged 7 commits into from
Feb 27, 2020

Conversation

jasontedor
Copy link
Member

We mades roles pluggable, but never updated the client to account for this. This means that when speaking to a modern cluster, application logs are spammed with warning messages around unrecognized roles. This commit addresses this by accounting for the fact that roles can extend beyond master/data/ingest now.

Closes #52864

We mades roles pluggable, but never updated the client to account for
this. This means that when speaking to a modern cluster, application
logs are spammed with warning messages around unrecognized roles. This
commit addresses this by accounting for the fact that roles can extend
beyond master/data/ingest now.
@jasontedor jasontedor added >bug :Clients/Java Low Level REST Client Minimal dependencies Java Client for Elasticsearch v8.0.0 v7.7.0 labels Feb 27, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Java Low Level REST Client)

@jasontedor
Copy link
Member Author

@elasticmachine update branch

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM, left one question regarding optional future work, but nothing this PR depends on.

}

/**
* Teturns whether or not the node <strong>could</strong> be elected master.
*/
public boolean isMasterEligible() {
return masterEligible;
return roles.contains("master");
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, should we make these constants since they're hardcoded as strings all over the place? (in separate work, not this PR)

@jasontedor jasontedor merged commit 89b0aad into elastic:master Feb 27, 2020
jasontedor added a commit that referenced this pull request Feb 27, 2020
We mades roles pluggable, but never updated the client to account for
this. This means that when speaking to a modern cluster, application
logs are spammed with warning messages around unrecognized roles. This
commit addresses this by accounting for the fact that roles can extend
beyond master/data/ingest now.
jasontedor added a commit that referenced this pull request Feb 27, 2020
We mades roles pluggable, but never updated the client to account for
this. This means that when speaking to a modern cluster, application
logs are spammed with warning messages around unrecognized roles. This
commit addresses this by accounting for the fact that roles can extend
beyond master/data/ingest now.
@jasontedor jasontedor deleted the fix-roles-parsing-in-llrc branch February 27, 2020 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ElasticsearchNodesSniffer complains about "unknown role [ml]"
4 participants