[PDB-2100] puppetdb ssl-setup fails when environment is not production Created: 2015/10/27  Updated: 2015/11/30  Resolved: 2015/11/10

Status: Closed
Project: PuppetDB
Component/s: None
Affects Version/s: None
Fix Version/s: PDB 3.2.1

Type: Bug Priority: Normal
Reporter: Roman Mueller Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: puppetdb
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

CentOS release 6.7 (Final)

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


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`:

    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).

Generated at Thu Jun 20 02:57:34 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.