Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-3083

docker: puppetserver.conf LOGDIR unhandled



    • Template:
      PUP Bug Template
    • Acceptance Criteria:

      Puppetserver (container) should log to the default file by default.

      Puppetserver (container) should log to the default file by default.
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment


      Hmmm, I think I have misunderstood.
      It seems like all logging from the container (webserver and puppetserver) is sent to stdout.
      I assume I'm supposed to get it via docker logs and not directly via files under the container's /var/log/

      Original report:

      Puppet Server Version: All (the container currently use 7.3.0-1bionic)
      OS Name/Version: Any linux (probably the same problem in Windows)

      This issue concerns puppetserver run as a docker container.

      The project https://github.com/puppetlabs/puppetserver/ does not have its own Issue tracking at github (as pupperware do), so I file this ticket here at tickets.puppetlabs.com instead:

      After starting puppetserver via Docker, the template file /etc/puppetlabs/puppetserver/conf.d/puppetserver.conf is never updated, leaving master-log-dir configuration like this:

          # (optional) path to puppet log dir; if not specified, will use
          # /var/log/puppetlabs/puppetserver
          master-log-dir: ${LOGDIR}

      Desired Behavior:
      The variable should be replaced with
      1) custom path, if any was specified when starting the container (see below)
      2) or "/var/log/puppetlabs/puppetserver" per default

      Actual Behavior:
      master-log-dir is literally set to ${LOGDIR}.
      Since this env variable is not set anywhere, it is empty, and puppetserver therefore don't log to file.

      In puppetserver.conf, all other paths are hardcoded (ex: master-conf-dir: /etc/puppetlabs/puppet). No variables are used.
      The container setup scripts should therefore do the same for master-log-dir.
      That is, replace the placeholder '${LOGDIR}' with the actual path
      (don't solve this by assigning the $LOGDIR variable in some global system file).

      See 40-update-puppetdb-conf.sh for a good example of both filename and contents.
      Perhaps you should add the file 45-update-puppetserver-conf.sh and sed the LOGDIR placeholder.
      (also see SERVER-3084 and fix this at the same time)

      Also, the instructions at https://hub.docker.com/r/puppet/puppetserver lack any information regarding $LOGDIR, so add a section.

      PS: When I tried to find where the logging was setup I only found this file:
      The filename could state it should setup the log config, but the contents has nothing to do with log setup, rather config printing.
      I think you should rename that file to 90-print-config.sh.




            Unassigned Unassigned
            elof Elof Ofel
            0 Vote for this issue
            1 Start watching this issue



                Zendesk Support