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

Init script incorrectly creates data dirs #441

Closed
jeffbyrnes opened this issue Mar 7, 2016 · 3 comments · Fixed by elastic/elasticsearch#17419
Closed

Init script incorrectly creates data dirs #441

jeffbyrnes opened this issue Mar 7, 2016 · 3 comments · Fixed by elastic/elasticsearch#17419

Comments

@jeffbyrnes
Copy link

On elasticsearch.in.sh.erb line 12, we simply convert the value of params[:DATA_DIR] to a string (see provider_configure.rb @ line 76 for the assignment). This results in one of two things:

  1. A string-delimited set of paths, which mkdir interprets literally (so you might end up with a path like /mnt/dev0/elasticsearch/data,/mnt/dev1/elasticsearch/data
  2. A string-y representation of your array (e.g., '["str1", "str2"]'), which bash does not like

It seems that the elasticsearch_configure LWRP and the service scripts for Debian & Ubuntu systems both create the data directories ES needs:

I think the mkdir in the service scripts can be removed, which would also give them parity with how the other systems’ service scripts work.

@martinb3
Copy link
Contributor

martinb3 commented Mar 7, 2016

Hello, and thanks for catching this! We're actually using the exact init scripts provided by the deb/rpm packages shipped from Elastic. I'm going to report this upstream... it's clear the init scripts can't handle comma-delimited data directories.

@jeffbyrnes
Copy link
Author

@martinb3 makes perfect sense.

@karmi
Copy link
Contributor

karmi commented May 18, 2016

Thanks for the fix, @dakrone!

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

Successfully merging a pull request may close this issue.

3 participants