noob problem: Could not find a directory environment named 'development'

1,935 views
Skip to first unread message

Peter K

unread,
Feb 16, 2017, 7:31:57 PM2/16/17
to Puppet Users
Hi all, I'm hoping you can point out some detail I'm missing. Puppet agent seems to run fine until I introduce hiera.  I believe the issue is configuration path related:

I'm using opensource pupperserver version 2.7.2 on an ubuntu 16.04 machine and puppet agent version 4.9.2  on a centos 7 client machine.
On the centos client, this is the result of:
$ sudo /opt/puppetlabs/bin/puppet config print 

/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:38:in `get!': Could not find a directory environment named 'development' 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:132: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>'

Here is my  /etc/puppetlabs/puppet/puppet.conf on the client:

[main]
server = puppet
environment = development
runinterval = 1h
environment_timeout = 0

But here's what I get on the client if I run (which works as expected): $ sudo /opt/puppetlabs/bin/puppet agent -t

Info: Using configured environment 'development'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for centosclient.pretenddomain.com
Info: Applying configuration version '1487270914'
Notice: You're in development
Notice: /Stage[main]/Main/Node[default]/Notify[Using_Development_Environment]/message: defined 'message' as 'You're in development'
Notice: Applied catalog in 0.31 seconds

Here are the only lines uncommented in /etc/puppetlabs/code/environments/development/environment.conf (This is on the ubuntu puppet server)

modulepath = /etc/puppetlabs/code/environments/development/modules:/etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules
manifest = ./manifests

thx, 
-peter

Message has been deleted

Peter K

unread,
Feb 17, 2017, 2:53:50 PM2/17/17
to Puppet Users
I fixed my site.pp and that got my hiera lookups working...but I still dont' understand the puppet config results.
-peter

Eric Sorenson

unread,
Feb 17, 2017, 4:59:49 PM2/17/17
to Puppet Users
Hi Peter, this is a known problem that is tracked in https://tickets.puppetlabs.com/browse/PUP-6739

--eric0

Peter K

unread,
Feb 21, 2017, 11:08:37 AM2/21/17
to Puppet Users
Thank you very much, Eric.
I feel I''ve regained some of my sanity.
-peter
Reply all
Reply to author
Forward
0 new messages