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

jvm_options may not be overridable because of sort in template #1053

Open
ThomasLohner opened this issue Sep 12, 2019 · 1 comment · May be fixed by #1054
Open

jvm_options may not be overridable because of sort in template #1053

ThomasLohner opened this issue Sep 12, 2019 · 1 comment · May be fixed by #1054
Labels
bug Something isn't working

Comments

@ThomasLohner
Copy link

  • Module version: 6.4.0 / master
  • Puppet version: all
  • OS and version: all

Bug description

Trying to set the jvm_option -Xms1024m does not work. The resulting jvm.options-File will look like this:

...
-Xms1024m
-Xms2048m
-Xmx1024m
-Xmx2048m
...

This is because of a default -Xms2048m which is set in jvm.options.erb and @jvm_options.sort.each in the same template. Sorting all keys of the jvm_options-Array results in -Xms2048m being written to the File after -Xms1024m. So effectively the default will override what is defined in jvm_options-Array.

How to reproduce

elasticsearch::jvm_options:
  - '-Xms1024m'
  - '-Xmx1024m'

Quickfix

Not nice but effective: Skipping sort will still write both options to jvm.options-File but java will only consider the last occurrence of the same key.

ThomasLohner added a commit to ScaleCommerce/puppet-elasticsearch that referenced this issue Sep 12, 2019
@ThomasLohner ThomasLohner linked a pull request Sep 12, 2019 that will close this issue
4 tasks
@fatmcgav fatmcgav added the bug Something isn't working label Feb 4, 2020
@c33s
Copy link
Member

c33s commented Dec 9, 2020

as workaround the version prefix described in #1032 (comment) works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants