Bug #2085
closedClasses import fails on first module with Puppet 3: Could not find value for $confdir
Description
puppet.conf contains the following environment config and a single module exists under /etc/puppet/modules/development
:
[development]
modulepath = /etc/puppet/modules/development:/etc/puppet/modules/common
The environment can be listed, but the class can't:
$ curl http://foreman:8443/puppet/environments
["development","production"]
$ curl http://foreman:8443/puppet/environments/development/classes
[]
The first search with PuppetClass.scan_manifest
is always failing, so the first module found isn't getting parsed, only subsequent modules:
irb -I lib/ -rproxy
irb(main):001:0> Proxy::Puppet::PuppetClass.scan_directory('/etc/puppet/modules/development')
Error while parsing /etc/puppet/modules/development/test/manifests/init.pp: Could not parse for environment production: Error converting value for param 'manifest': Error converting value for param 'manifestdir': Could not find value for $confdir
=> []
irb(main):002:0> Proxy::Puppet::PuppetClass.scan_directory('/etc/puppet/modules/development')
=> [#<Proxy::Puppet::PuppetClass:0x7f416cb7e9e0 @params={"foo"=>"fqdn_rand(10, undef)"}, @klass="test">]
Updated by Alexander Litvinenko almost 12 years ago
Also, when $confdir variable is used in puppet.conf, no environment is available at all - rake puppet:import:puppet_classes RAILS_ENV=production returns empry array.
Sample string in puppet.conf from Puppet Docs: modulepath = $confdir/environments/$environment/modules:$confdir/modules
Updated by Dominic Cleal almost 12 years ago
Alexander Litvinenko wrote:
Also, when $confdir variable is used in puppet.conf, no environment is available at all - rake puppet:import:puppet_classes RAILS_ENV=production returns empry array.
Sample string in puppet.conf from Puppet Docs: modulepath = $confdir/environments/$environment/modules:$confdir/modules
Has this worked for you before? I just tried Foreman 1.1 with Puppet 2.7.20 and it didn't work, so I'll probably call it a separate bug.
Updated by Alexander Litvinenko almost 12 years ago
No, it's just not working, and newer works earlier.
Updated by Dominic Cleal almost 12 years ago
- Status changed from New to Assigned
Thanks - I've filed it as #2099, as it's a little different to the puppet 3 initialisation problem here.
Updated by Dominic Cleal almost 12 years ago
I'm considering this a blocker for 1.1 and have a proper solution in the works, but here's a quick hack for anybody who wants their proxy to work: http://people.redhat.com/~dcleal/2085_puppet3_temp_fix.patch
Updated by Dominic Cleal almost 12 years ago
- Status changed from Assigned to Ready For Testing
Updated by Dominic Cleal almost 12 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset d58db7573838c16005113e201833b535af90e6cf.