Issue #17783 has been updated by eric sorenson.

Priority changed from Normal to High
Target version set to 3.x
Keywords changed from settings interfaces to settings interfaces backlog

Bumping to backlog for Q1'13 consideration.
----------------------------------------
Feature #17783: No public interface to reinitialize all settings to find new 
environments
https://projects.puppetlabs.com/issues/17783#change-80921

Author: Dominic Cleal
Status: Accepted
Priority: High
Assignee: 
Category: settings
Target version: 3.x
Affected Puppet version: 3.0.0
Keywords: settings interfaces backlog
Branch: 


Foreman's proxy calls the `Puppet::Settings` class to learn of all environments 
and their settings (modulepaths) that a puppet master is configured to serve.  
Since the proxy is a daemon, it needs to be able to pick up changes made to 
puppet.conf without restarting.

With Puppet 2.x, this would look like:

    Puppet.clear
    Puppet.parse_config

With Puppet 3.0, we call this method indicating the run_mode we're interested 
in (Foreman isn't a face, it's just enquiring about the behaviour of the 
puppetmaster):

    Puppet.settings.initialize_global_settings(["--config=/path", '--run_mode' 
'master'])

This can only be called once, since `@global_defaults_initialized` is set in 
Puppet::Settings and it throws an error if called twice.  The `clear` method 
doesn't reset global or app defaults (by er, default) and the only method that 
does is the private `clear_everything_for_tests` method.  Calling this private 
method instead of `clear`, then calling `initialize_global_settings` again 
allows us to pick up on environment changes in puppet.conf successfully.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to