diff options
| author | Luke Kanies <luke@madstop.com> | 2008-07-02 00:32:52 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-07-02 00:32:52 -0500 |
| commit | 8e4312ed249d83ece754b80e993fa0d86bd36d46 (patch) | |
| tree | 8b6044079dbb05a1f84a09a2f8e99cf1b87a3e9e /lib/puppet/network/client | |
| parent | 49016bb29312bfeb6f41ce420159e6ffc477eebe (diff) | |
| parent | d3a81255245eec19ac21902ae3b877e00e620628 (diff) | |
| download | puppet-8e4312ed249d83ece754b80e993fa0d86bd36d46.tar.gz puppet-8e4312ed249d83ece754b80e993fa0d86bd36d46.tar.xz puppet-8e4312ed249d83ece754b80e993fa0d86bd36d46.zip | |
Merge branch '0.24.x'
Conflicts:
CHANGELOG
spec/unit/node/catalog.rb
spec/unit/type/package.rb
spec/unit/type/schedule.rb
spec/unit/type/service.rb
spec/unit/util/settings.rb
Diffstat (limited to 'lib/puppet/network/client')
| -rw-r--r-- | lib/puppet/network/client/master.rb | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb index a2b6499bb..26eff52a0 100644 --- a/lib/puppet/network/client/master.rb +++ b/lib/puppet/network/client/master.rb @@ -26,6 +26,20 @@ class Puppet::Network::Client::Master < Puppet::Network::Client down = Puppet[:downcasefacts] + Facter.clear + + # Reload everything. + if Facter.respond_to? :loadfacts + Facter.loadfacts + elsif Facter.respond_to? :load + Facter.load + else + Puppet.warning "You should upgrade your version of Facter to at least 1.3.8" + end + + # This loads all existing facts and any new ones. We have to remove and + # reload because there's no way to unload specific facts. + loadfacts() facts = Facter.to_hash.inject({}) do |newhash, array| name, fact = array if down @@ -114,6 +128,9 @@ class Puppet::Network::Client::Master < Puppet::Network::Client def getconfig dostorage() + # Retrieve the plugins. + getplugins() if Puppet[:pluginsync] + facts = nil Puppet::Util.benchmark(:debug, "Retrieved facts") do facts = self.class.facts @@ -121,9 +138,6 @@ class Puppet::Network::Client::Master < Puppet::Network::Client raise Puppet::Network::ClientError.new("Could not retrieve any facts") unless facts.length > 0 - # Retrieve the plugins. - getplugins() if Puppet[:pluginsync] - Puppet.debug("Retrieving catalog") # If we can't retrieve the catalog, just return, which will either @@ -339,23 +353,6 @@ class Puppet::Network::Client::Master < Puppet::Network::Client files << resource[:path] end - ensure - # Clear all existing definitions. - Facter.clear - - # Reload everything. - if Facter.respond_to? :loadfacts - Facter.loadfacts - elsif Facter.respond_to? :load - Facter.load - else - raise Puppet::Error, - "You must upgrade your version of Facter to use centralized facts" - end - - # This loads all existing facts and any new ones. We have to remove and - # reload because there's no way to unload specific facts. - loadfacts() end # Retrieve the plugins from the central server. We only have to load the |
