puppetlabs / puppetserver-helm-chart

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

Doesn't start puppetserver after restart #155

Closed akiryushin closed 1 year ago

akiryushin commented 1 year ago

Describe the Bug

After restart puppetserver pod doesn't run due to init-container 'perms-and-dirs'. check_for_masters.sh script has gone into an infinite loop. Also multimaster doesn't work.

Expected Behavior

After restart puppetserver is running.

Steps to Reproduce

Steps to reproduce the behavior:

  1. helm repo add puppet https://puppetlabs.github.io/puppetserver-helm-chart
  2. Create values.yaml
    puppetserver:
    multiMasters:
         enabled: true
  3. helm install --namespace puppetserver --name puppetserver puppet/puppetserver -f values.yaml
  4. Restart puppetserver pod

Environment

Additional Context

I propose two solutions to this problem:

  1. Add a dynamic variable to script as following PUPPET_SSL_CERT_PEM="/etc/puppetlabs/puppet/ssl/certs/$(puppet config print certname).pem"
  2. Add environment variable to all configuration
    name: PUPPETSERVER_HOSTNAME
    value: puppet
davidphay commented 1 year ago

Hey @akiryushin - thanks for the bug report!

please feel free to send our way a PR - I'll be happy to review and merge it, afterwards.

davidphay commented 1 year ago

@akiryushin I prepare a PR for the fix

davidphay commented 1 year ago

Can you test now it should be fixed by this PR: https://github.com/puppetlabs/puppetserver-helm-chart/pull/159

davidphay commented 1 year ago

I close the issue, feel free to open it again if it not work as expected