[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 2.6.1rc1-141-gcdb2b90

Markus Roberts Markus at reality.com
Mon Aug 16 12:48:56 UTC 2010


The following commit has been merged in the upstream branch:
commit 6aac8f0185db1d153583230de726c30ce949fc78
Author: Rein Henrichs <rein at puppetlabs.com>
Date:   Wed Aug 4 11:55:23 2010 -0700

    [#4467] Make Puppet Master respect facts_terminus settings
    
    * Remove hard-coded facts terminus in master
    * Change facts_terminus default to 'yaml' for master and 'facter' for
      everything else.
    
    Paired-with: Matt Robinson <matt at puppetlabs.com>
    Signed-off-by: Rein Henrichs <rein at puppetlabs.com>

diff --git a/lib/puppet/application/master.rb b/lib/puppet/application/master.rb
index 777a50e..fde4749 100644
--- a/lib/puppet/application/master.rb
+++ b/lib/puppet/application/master.rb
@@ -138,9 +138,6 @@ class Puppet::Application::Master < Puppet::Application
 
     Puppet.settings.use :main, :master, :ssl
 
-    # 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
 
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 1c5ca53..028f911 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -115,7 +115,7 @@ module Puppet
     :node_terminus => ["plain", "Where to find information about nodes."],
     :catalog_terminus => ["compiler", "Where to get node catalogs.  This is useful to change if, for instance,
       you'd like to pre-compile catalogs and store them in memcached or some other easily-accessed store."],
-    :facts_terminus => ["facter", "Where to get node facts."],
+    :facts_terminus => [Puppet.application_name.to_s == "master" ? 'yaml' : 'facter', "The node facts terminus."],
     :httplog => { :default => "$logdir/http.log",
       :owner => "root",
       :mode => 0640,
diff --git a/spec/unit/indirector/node/ldap_spec.rb b/spec/unit/indirector/node/ldap_spec.rb
index f9c5efa..a5f14fc 100755
--- a/spec/unit/indirector/node/ldap_spec.rb
+++ b/spec/unit/indirector/node/ldap_spec.rb
@@ -5,10 +5,6 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
 require 'puppet/indirector/node/ldap'
 
 describe Puppet::Node::Ldap do
-  before do
-    Puppet::Node::Facts.stubs(:terminus_class).returns :yaml
-  end
-
   describe "when searching for a single node" do
     before :each do
       @searcher = Puppet::Node::Ldap.new
diff --git a/spec/unit/node/facts_spec.rb b/spec/unit/node/facts_spec.rb
index a2f4ab9..394db79 100755
--- a/spec/unit/node/facts_spec.rb
+++ b/spec/unit/node/facts_spec.rb
@@ -88,9 +88,20 @@ describe Puppet::Node::Facts, "when indirecting" do
       @facts.save
     end
 
-    it "should default to the 'facter' terminus" do
-      Puppet::Node::Facts.indirection.terminus_class.should == :facter
+    describe "when the Puppet application is 'master'" do
+      it "should default to the 'yaml' terminus" do
+        pending "Cannot test the behavior of defaults in defaults.rb"
+        # Puppet::Node::Facts.indirection.terminus_class.should == :yaml
+      end
     end
+
+    describe "when the Puppet application is not 'master'" do
+      it "should default to the 'facter' terminus" do
+        pending "Cannot test the behavior of defaults in defaults.rb"
+        # Puppet::Node::Facts.indirection.terminus_class.should == :facter
+      end
+    end
+
   end
 
   describe "when storing and retrieving" do

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list