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

GET _nodes/master:false does not work #28797

Closed
linker-c opened this issue Feb 23, 2018 · 6 comments
Closed

GET _nodes/master:false does not work #28797

linker-c opened this issue Feb 23, 2018 · 6 comments

Comments

@linker-c
Copy link

linker-c commented Feb 23, 2018

Describe the feature:

Elasticsearch version (bin/elasticsearch --version): 6.1.1

Plugins installed: [None]

JVM version (java -version): Not applicable

OS version (uname -a if on a Unix-like system): Not applicable

Description of the problem including expected versus actual behavior:
There is a bug where searching for a node type == false returns nothing.
Master node type is just one example. data:false is also not working.

What I'm trying to do is to discover just the ingest nodes for writing, and only coordinator nodes for reading.
Then I encountered this issue.

Steps to reproduce:

From kibana Dev Tools Console

  1. GET /_nodes/master:true returns the master nodes in my cluster
  2. GET /_nodes/master:false returns no nodes.

Provide logs (if relevant):
GET /_nodes/master:true returns the following 3 nodes
image

GET /_nodes/master:false returns nothing
image

GET /_cat/nodes?v // I have total of 9 nodes in the cluster
image

@jasontedor
Copy link
Member

This feature works like this: if you specify role:true, it is additive (it adds nodes matching that role to the set of nodes that will be returned) and if you specify role:false, it is subtractive (it removes nodes matching that role from the set of nodes already collected). Order matters. So, to see all data nodes that are not master-eligible nodes: data:true,master:false. To see all master-eligible nodes that are not data nodes: master:false,data:true.

I hope this helps.

@linker-c
Copy link
Author

linker-c commented Feb 23, 2018

Thanks @jasontedor . That's more clear than the official document would state.
How do I find coordinator nodes that's not data nor master?

@jasontedor
Copy link
Member

How do I find coordinator nodes that's not data nor master?

I do not think that is possible with the existing functionality, sorry.

@jasontedor
Copy link
Member

@linker-mist I have integrated #28971 which will make it possible to do /_nodes/_all,data:false,master:false to obtain all coordinating nodes that are not data nodes and not master-eligible.

@XANi
Copy link

XANi commented May 22, 2018

@jasontedor Could you add your explanation to docs ?

https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cluster.html#cluster-nodes page says nothing about it and it is a really useful function

@DaveCTurner
Copy link
Contributor

DaveCTurner commented May 22, 2018

Since #30313 you can say /_nodes/coordinating_only:true to obtain the coordinating-only nodes, and /_nodes/ingest:true yields the ingest nodes. Updated docs for this are on their way in #30468. This'll be in 6.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants