summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-03-24 16:37:48 -0500
committerLuke Kanies <luke@madstop.com>2008-03-24 16:37:48 -0500
commit017f6730aa4b8afcc0f8da80c79eb6981a1ad6b9 (patch)
treeaf020b8ea4eda42258502328482511989da5bfb5
parent30f0fc0b1ce1900b6d94ec61ddb17fa1fdfdae5a (diff)
Moved the configuration of the Node cache to the puppetmasterd
executable, since it otherwise causes caches to be used in all cases, which we don't want (e.g., bin/puppet was using them).
-rwxr-xr-xbin/puppetmasterd3
-rw-r--r--lib/puppet/node.rb2
-rwxr-xr-xspec/unit/node.rb4
3 files changed, 6 insertions, 3 deletions
diff --git a/bin/puppetmasterd b/bin/puppetmasterd
index 33e4f436d..b4733e604 100755
--- a/bin/puppetmasterd
+++ b/bin/puppetmasterd
@@ -188,6 +188,9 @@ Puppet.genmanifest
# A temporary solution, to at least make the master work for now.
Puppet::Node::Facts.terminus_class = :yaml
+# Cache our nodes in yaml. Currently not configurable.
+Puppet::Node.cache_class = :yaml
+
require 'etc'
handlers = {
diff --git a/lib/puppet/node.rb b/lib/puppet/node.rb
index c39f364bc..c0628ecdc 100644
--- a/lib/puppet/node.rb
+++ b/lib/puppet/node.rb
@@ -10,7 +10,7 @@ class Puppet::Node
extend Puppet::Indirector
# Use the node source as the indirection terminus.
- indirects :node, :terminus_setting => :node_terminus, :cache_class => :yaml, :doc => "Where to find node information.
+ indirects :node, :terminus_setting => :node_terminus, :doc => "Where to find node information.
A node is composed of its name, its facts, and its environment."
# Retrieve a node from the node source, with some additional munging
diff --git a/spec/unit/node.rb b/spec/unit/node.rb
index 4861cb9e3..e62bd5d07 100755
--- a/spec/unit/node.rb
+++ b/spec/unit/node.rb
@@ -127,8 +127,8 @@ describe Puppet::Node, " when indirecting" do
Puppet::Node.indirection.terminus_class.should == :plain
end
- it "should use yaml for caching" do
- Puppet::Node.indirection.cache_class.should == :yaml
+ it "should not have a cache class defined" do
+ Puppet::Node.indirection.cache_class.should be_nil
end
after do