Open
Description
- 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.