Skip to content

update client node detection method#5556

Closed
tsullivan wants to merge 1 commit intoelastic:masterfrom
tsullivan:fix-client-node-detection
Closed

update client node detection method#5556
tsullivan wants to merge 1 commit intoelastic:masterfrom
tsullivan:fix-client-node-detection

Conversation

@tsullivan
Copy link
Copy Markdown
Member

I was looking at how Kibana determines that it's compatible with the versions of Elasticsearch on all the nodes in the cluster, and I saw this code that detects client nodes. I've seen a newer method for doing this, and figured it should be updated here.

To test:

  • Start an elasticsearch v2.1.0 data node
  • Start an elasticsearch v2.0.0 client node (bin/elasticsearch --node.data=false --node.master=false)
  • Kibana should start and go into Green status

@simianhacker
Copy link
Copy Markdown
Member

LGTM

@epixa
Copy link
Copy Markdown
Contributor

epixa commented Dec 4, 2015

I'm not really familiar with this, so I am not a good person to give this a second review, but I do have a proposal to help us avoid inconsistencies like this in the future:

It'd be great if we started moving more and more of this type of functionality into standalone modules that could be imported into multiple projects. Basically any time we're implementing similar logic in two different repos (i.e. kibana and marvel), we could instead be implementing it in a single place and then have those repos simply import it as a dependency.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

does it make sense to use esBool(attrs.master), esBool(attrs.data) here? I'm not sure if it's ever anything other than 'false' but under the assumption the method was made for a reason

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would agree with this, and also add I'm not very comfortable with comparison of 'false' as a String.

@tsullivan tsullivan assigned tsullivan and unassigned simianhacker Dec 4, 2015
@spalger spalger assigned panda01 and unassigned tsullivan Dec 14, 2015
@panda01 panda01 assigned tsullivan and unassigned panda01 Dec 14, 2015
@tsullivan tsullivan force-pushed the fix-client-node-detection branch 2 times, most recently from a43ddee to 82b2d65 Compare December 14, 2015 21:57
@tsullivan tsullivan force-pushed the fix-client-node-detection branch from 82b2d65 to ee19328 Compare December 14, 2015 23:00
@tsullivan
Copy link
Copy Markdown
Member Author

I was convinced about preserving esBool - good call, people.

It'd be great if we started moving more and more of this type of functionality into standalone modules that could be imported into multiple projects. Basically any time we're implementing similar logic in two different repos (i.e. kibana and marvel), we could instead be implementing it in a single place and then have those repos simply import it as a dependency.

@epixa since all the plugins are going to use Kibana as the app infrastructure, how about we integrating this logic into the elasticsearch plugin and exporting it so other plugins could share? The only downside I see to this, is that if we keep going down this path, the cross-sharing of data and methods between plugins could become quite a jungle.

@tsullivan
Copy link
Copy Markdown
Member Author

Talked to @rashidkpc and @spalger about this. Seems like it would be better to not filter out client nodes at all. Although most of the time having old versions of client nodes will not break anything, client nodes do some preprocessing of the request, so there are no guarantees that old client nodes won't break things by preprocessing the request in a way that up-to-date versions of elasticsearch can't support.

@rashidkpc
Copy link
Copy Markdown
Contributor

Also, users that want to avoid upgrading client nodes can use http instead of the binary protocol as a work around

@LeeDr LeeDr removed the v4.4.0 label Jan 13, 2016
@tsullivan tsullivan deleted the fix-client-node-detection branch July 19, 2018 05:19
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.

7 participants