summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/client
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-04-11 13:01:42 -0500
committerLuke Kanies <luke@madstop.com>2008-04-11 13:01:42 -0500
commitfb05ef3c96038d67a46eb142202af186ad6cb0b3 (patch)
tree148e8b882e5c8104c4f3fa8ecc4288e8608f812d /lib/puppet/network/client
parentb49fb68f768e8b98c555ef0ae08a7bd22f5d36bd (diff)
parentb49fd495622b15f96faf944db1e70cbe9e7fe7c4 (diff)
downloadpuppet-fb05ef3c96038d67a46eb142202af186ad6cb0b3.tar.gz
puppet-fb05ef3c96038d67a46eb142202af186ad6cb0b3.tar.xz
puppet-fb05ef3c96038d67a46eb142202af186ad6cb0b3.zip
Merge branch '0.24.x'
Diffstat (limited to 'lib/puppet/network/client')
-rw-r--r--lib/puppet/network/client/master.rb58
1 files changed, 2 insertions, 56 deletions
diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb
index 4c7fa5f5b..a2b6499bb 100644
--- a/lib/puppet/network/client/master.rb
+++ b/lib/puppet/network/client/master.rb
@@ -49,6 +49,8 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
end
# Return the list of dynamic facts as an array of symbols
+ # NOTE:LAK(2008/04/10): This code is currently unused, since we now always
+ # recompile.
def self.dynamic_facts
# LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
x = Puppet.settings[:dynamicfacts].split(/\s*,\s*/).collect { |fact| fact.downcase }
@@ -96,31 +98,6 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
end
end
- # Check whether our catalog is up to date
- def fresh?(facts)
- if Puppet[:ignorecache]
- Puppet.notice "Ignoring cache"
- return false
- end
- unless self.compile_time
- Puppet.debug "No cached compile time"
- return false
- end
- if facts_changed?(facts)
- Puppet.info "Facts have changed; recompiling" unless local?
- return false
- end
-
- newcompile = @driver.freshness
- # We're willing to give a 2 second drift
- if newcompile - @compile_time.to_i < 1
- return true
- else
- Puppet.debug "Server compile time is %s vs %s" % [newcompile, @compile_time.to_i]
- return false
- end
- end
-
# Let the daemon run again, freely in the filesystem. Frolick, little
# daemon!
def enable
@@ -147,11 +124,6 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
# Retrieve the plugins.
getplugins() if Puppet[:pluginsync]
- if (self.catalog or FileTest.exist?(self.cachefile)) and self.fresh?(facts)
- Puppet.info "Configuration is up to date"
- return if use_cached_config
- end
-
Puppet.debug("Retrieving catalog")
# If we can't retrieve the catalog, just return, which will either
@@ -450,32 +422,6 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
loadfacts()
- # Have the facts changed since we last compiled?
- def facts_changed?(facts)
- oldfacts = (Puppet::Util::Storage.cache(:configuration)[:facts] || {}).dup
- newfacts = facts.dup
- self.class.dynamic_facts.each do |fact|
- [oldfacts, newfacts].each do |facthash|
- facthash.delete(fact) if facthash.include?(fact)
- end
- end
-
- if oldfacts == newfacts
- return false
- else
-# unless oldfacts
-# puts "no old facts"
-# return true
-# end
-# newfacts.keys.each do |k|
-# unless newfacts[k] == oldfacts[k]
-# puts "%s: %s vs %s" % [k, newfacts[k], oldfacts[k]]
-# end
-# end
- return true
- end
- end
-
# Actually retrieve the catalog, either from the server or from a
# local master.
def get_actual_config(facts)