Git Product home page Git Product logo

Comments (10)

electrical avatar electrical commented on June 26, 2024

Interesting issue. can you give me an example value for the ES_JAVA_OPTS?
Will do some investigation on this and add testing.

from puppet-elasticsearch.

dblessing avatar dblessing commented on June 26, 2024

I found this discussion from a while back, but I think the solution is valid. http://www.redhat.com/archives/augeas-devel/2008-October/msg00023.html

In a quick test I put single quotes around the <%= value %> in defaults.erb so it looks like this:

<% @init_defaults.sort.map do |key, value| -%>
set <%= key %> '<%= value %>'
<% end -%>

Then, in my init_defaults hash I set
ES_JAVA_OPTS => '"-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9012 -Dcom.sun.management.jmxremote.ssl=false"' as an example (that's double quotes wrapped in single quotes). The end result is that the set command looks like:
set ES_JAVA_OPTS '"-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9012 -Dcom.sun.management.jmxremote.ssl=false"'

The double quotes carry through and end up as the following line in /etc/sysconfig/elasticsearch - and works beautifully.
ES_JAVA_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9012 -Dcom.sun.management.jmxremote.ssl=false"

Would you be interested in a fix like this? It's completely backward compatible as far as I can tell.

from puppet-elasticsearch.

electrical avatar electrical commented on June 26, 2024

Ahh interesting. Totally didn't expect that.
Assuming it won't cause any issues with other values ( numbers, true/false ) im happy with the fix :-)

from puppet-elasticsearch.

dblessing avatar dblessing commented on June 26, 2024

Ok, I'll see if I can write some tests. Thanks for the feedback.

from puppet-elasticsearch.

dblessing avatar dblessing commented on June 26, 2024

I made the change. I don't think it will break current tests. I'm struggling to get the tests working on my box so I'm not sure if I'll be able to add new tests.

from puppet-elasticsearch.

dblessing avatar dblessing commented on June 26, 2024

What command is needed to execute the tests? Including ENV vars? I think that's my issue.

from puppet-elasticsearch.

electrical avatar electrical commented on June 26, 2024

Hi,

Commands are in .travis.yml file but might fail in certain scenario's because i messed something up.

bundle install
bundle exec rake spec SPEC_OPTS='--format documentation'

from puppet-elasticsearch.

dblessing avatar dblessing commented on June 26, 2024

\o/ Thank you!

from puppet-elasticsearch.

dblessing avatar dblessing commented on June 26, 2024

Updated PR #106 with tests to account for this change.

from puppet-elasticsearch.

elisiano avatar elisiano commented on June 26, 2024

I'm seeing this with the latest version of the module (from the forge - 0.15.0).
Since we cannot specify ES_HEAP_SIZE anymore with elasticsearch 5, I set ES_JAVA_OPTS but when I try with the space (ES_JAVA_OPTS="-Xms8g -Xmx8g") then augeasproviders_shellvar fails.

When I try with just ES_JAVA_OPTS="-Xmx8g" it works fine.

Anyone aware of a workaround?

from puppet-elasticsearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.