Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-2100

puppetdb ssl-setup fails when environment is not production

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDB 3.2.1
    • Component/s: None
    • Labels:
    • Environment:

      CentOS release 6.7 (Final)
      puppet-agent-1.2.6-1.el6.x86_64
      puppetdb-3.1.0-1.el6.noarch
      puppetlabs-release-pc1-1.0.0-1.el6.noarch

    • Template:
    • Story Points:
      2
    • Sprint:
      PuppetDB 2015-11-18

      Description

      I'm trying to deploy puppetdb as a standalone server (not collocated with puppetserver/puppet-master) on a system which is running puppet-agent and is not in the `production` environment.
      The system has the following setting in `/etc/puppetlabs/puppet/puppet.conf`:

      [main]
          environment = redacted
      

      As the final step of the installation I'm running `/opt/puppetlabs/bin/puppetdb ssl-setup`.
      However this fails:

      [root@puppet4-1 vagrant]# /opt/puppetlabs/bin/puppetdb ssl-setup 
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:38:in `get!': Could not find a directory environment named 'redacted' anywhere in the path: /etc/puppetlabs/code/environments. Does the directory exist? (Puppet::Environments::EnvironmentNotFound)
      	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application_support.rb:29:in `push_application_context'
      	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:337:in `run'
      	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:128:in `run'
      	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
      	from /opt/puppetlabs/bin/puppet:5:in `<main>'
      

      Of course that folder does not exist, that node is only running the agent.
      When I take out the `environment` setting from puppet.conf it continues to run (since the puppet-agent RPM places a skeleton /etc/puppetlabs/code/environments/production environment and the setting defaults to production).

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                faker Roman Mueller
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: