Bug #1915
closed
I can pull this in as part of the puppet 3 work I'm doing. Can you provide a link to the puppet-dev email?
Hi,
I am in the process of getting Foreman to work with puppet3 on Debian squeeze.
For this particular problem, here is what I did:
/usr/share/foreman-proxy/lib/proxy/puppet/environment.rb => replace "Puppet.parse_config" with:
if $isLoaded == nil
puts "loading"
Puppet.settings.initialize_global_settings(['--config=/etc/puppet/puppet.conf'])
$isLoaded = true
else
puts "already loaded"
end
also add the snippet inside the load method of /usr/share/foreman/lib/foreman/default_settings/loader.rb
Last thing is to remove Puppet.parse.
Hope it works for you.
- Assignee changed from Greg Sutcliffe to Sam Kottler
This is the puppet-dev thread: https://groups.google.com/d/topic/puppet-dev/Yk0WC1JZCg8/discussion
Chris Price's post there is valuable because he suggests that the entry point `Puppet.initialize_settings` is the simplest / most accessible method to call, but it implies a `:user` run-mode. If that's not what you want (because that would skip settings in the `[master]` section of the config file), my suggestion from tracing through this yesterday would be to do :
Puppet.settings.initialize_global_settings(['--config=/etc/puppet/puppet.conf', '--run_mode=master'])
The puppet platform devs are planning to get this cleaned up and documented for 3.1; we are sorry for the churn on it but several band-aid attempts caused bad follow-on effects so it's getting a properly engineered solution.
After applying the change on Puppet.parse_config
to
Puppet.settings.initialize_global_settings(Puppet[:config]) unless Puppet.settings.global_defaults_initialized?
had to comment out
#Puppet.clear
- Category set to Puppet
- Status changed from New to Assigned
- Assignee changed from Sam Kottler to Dominic Cleal
Two pulls to address this, the main one being for the smart proxy, but related was one in foreman itself:
Thanks for the suggestion Eric, that helped solve the problems seen initialising some basic settings such as confdir and vardir when the run_mode wasn't specified. I've worked around #17492 with --run_mode and also fixed the original bug report here with a hack until a public interface is added in Puppet 3.1 to enable full reparsing of the config (#17783).
- Target version set to 1.1
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
Applied in changeset commit:"ff16a263433c5f3202b81663ba9a6745dd11a047".
Also available in: Atom
PDF