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

Bug: ElasticSearch data path collision #407

Closed
3 tasks done
mischabraam opened this issue Aug 30, 2019 · 3 comments
Closed
3 tasks done

Bug: ElasticSearch data path collision #407

mischabraam opened this issue Aug 30, 2019 · 3 comments
Assignees
Labels
2.x Issues / features related the the 2.x branch Bug Bugs PATCH This change is patch level

Comments

@mischabraam
Copy link
Member

mischabraam commented Aug 30, 2019

  • I've checked the issue queue and could not find anything similar to my bug.
  • I'm on the latest version of valet-plus (valet --version): master branch :D
  • I've run valet fix and valet install after updating and before submitting my issue/feature.

What is the problem?
The problem is the installation sequence of ElasticSearch and the sharing of the datapath between the versions of ElasticSearch. The way ES indexes the data differs between versions, which means that (for instance) ES6.8 can't read data from ES2.4 or ES5.6.
The datapath is configured in elasticsearch.yml. Valet+ alters this config file and uses the version of the used ES version as suffix for the datapath. So, if you switch to ES2.4 the datapath will be ..../[email protected].

The actual problem occurs for people that already have 2.4 or 5.6 installed using an older version of Valet+ in combination of switching to ES6.8. ES6.8 is currently the main version offered by Brew. So, brew install elasticsearch will install ES6.8. This is also used by Valet+ when switching to ES6.8. For this version there is no suffix @6.8, result is a datapath also without suffix.

So, if you have ES2.4 installed in older version of Valet+ the datapath is .../elasticsearch (default before switch feature). When switching to ES6.8 by using valet use es 6.8, the new datapath is also .../elasticsearch. This collides with the already indexed data in 2.4, 6.8 can't read it.

What was supposed to happen?
Installation of ES6.8 should be indeed without suffix (currently correct). However, switching to ES6.8 should use the @6.8 suffix for the datapath config to prevent collisions with older installations.

What actually happened?
A description of what actually happened.

How to reproduce this?

  • Remove all versions of ElasticSearch with brew remove elasticsearch [email protected] [email protected]
  • Remove all indexed data and config with rm -rf /usr/local/var/elasticsearch* and rm -rf /usr/local/etc/elasticsearch
  • Manually install ES2.4 with brew install [email protected]
  • Switch to ES6.8 with valet use es 6.8

What is the solution?
Always use version as @<version> as suffix in the datapath.

@mischabraam mischabraam added Bug Bugs Needs review Tickets that need review labels Aug 30, 2019
@Neodork Neodork added 2.x Issues / features related the the 2.x branch PATCH This change is patch level and removed Needs review Tickets that need review labels Aug 30, 2019
@mischabraam
Copy link
Member Author

mischabraam commented Aug 30, 2019

As a temp work around. You can follow steps below.

  • Remove all versions of ElasticSearch with brew remove elasticsearch [email protected] [email protected]
  • Remove all indexed data and config with rm -rf /usr/local/var/elasticsearch* and rm -rf /usr/local/etc/elasticsearch
  • Install ES6.8 with valet use es 6.8 first
  • Install desired other version with valet use es 2.4

@mischabraam mischabraam self-assigned this Aug 30, 2019
mischabraam pushed a commit that referenced this issue Sep 2, 2019
# Conflicts:
#	cli/Valet/Elasticsearch.php
@Neodork
Copy link
Collaborator

Neodork commented Feb 12, 2020

@mischabraam Closing as PR is merged!

@Neodork Neodork closed this as completed Feb 12, 2020
@amarroni
Copy link
Contributor

Hi guys how are you?,
Problem still happening on valet+ 2.0. I try to follow @mischabraam but elasticsearch still pointing to 2.4.
How can I solve this issue?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issues / features related the the 2.x branch Bug Bugs PATCH This change is patch level
Projects
None yet
Development

No branches or pull requests

3 participants