puppetlabs / puppetserver-helm-chart

The Helm Chart for Puppet Server
Apache License 2.0
52 stars 56 forks source link

Unrecognized JAVA ARGS for PuppetDB #202

Closed felipeatsix closed 10 months ago

felipeatsix commented 10 months ago

Describe the Bug

Upon installation of the helm chart, PuppetDB pod will crash (CrashLoopbackOff) By checking on the pod logs we can see the problem:

Unrecognized option: -Xlog:gc:/opt/puppetlabs/server/data/puppetdb/puppetdb_gc.log
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Expected Behavior

PuppetDB pod won't crash upon clean helm chart installation, without need to modify any parameters for it in the helm chart.

Steps to Reproduce

  1. Install puppetlabs helm-chart.
  2. Check pod status.

Environment

Additional Context

As a workaround I just deleted the parameter from the helm chart:

Before modification:

  ## Additional puppetdb container environment variables
  extraEnv:
    PUPPETDB_JAVA_ARGS: "-Djava.net.preferIPv4Stack=true -Xms256m -Xmx256m -XX:+UseParallelGC -Xlog:gc:/opt/puppetlabs/server/data/puppetdb/puppetdb_gc.log -Djdk.tls.ephemeralDHKeySize=2048"

Modified version (fix):

  ## Additional puppetdb container environment variables
  extraEnv:
    PUPPETDB_JAVA_ARGS: "-Djava.net.preferIPv4Stack=true -Xms256m -Xmx256m -XX:+UseParallelGC -Djdk.tls.ephemeralDHKeySize=2048"
Xtigyro commented 10 months ago

@felipeatsix Would you mind please sending our way a PR?

felipeatsix commented 10 months ago

Okay, I'll do during the weekend, but I was expecting that you guys would actually have a proper fix instead of applying this workaround.

ldaneliukas commented 10 months ago

IMHO we can remove that line altogether since -Xlog:gc was added to the latest PuppetDB container Dockerfile as the default where required. @felipeatsix could you see if it works as expected without specifying any value for PUPPETDB_JAVA_ARGS ?

felipeatsix commented 10 months ago

@ldaneliukas Yup, we need to still provide the keys for the configuration (erasing everything would crash because the java virtual machine is not created), but leaving the value completely empty still works.

  ## Additional puppetdb container environment variables
  extraEnv:
    PUPPETDB_JAVA_ARGS: ""
felipeatsix commented 10 months ago

I will be submitting a PR later without the line.

Thanks.