summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-03-25 18:18:34 -0500
committerLuke Kanies <luke@madstop.com>2008-03-25 18:18:34 -0500
commita8592f1009040ebf30a98268610915cc33bb3f63 (patch)
tree49f61323a8536d58ce332e97b882677f55727df7
parente1907798425a7b163ac1b831b0cf11e88985815e (diff)
parent491a69682728818e04b8a20a5d8f4f783ad6ddaf (diff)
downloadpuppet-a8592f1009040ebf30a98268610915cc33bb3f63.tar.gz
puppet-a8592f1009040ebf30a98268610915cc33bb3f63.tar.xz
puppet-a8592f1009040ebf30a98268610915cc33bb3f63.zip
Merge branch '0.24.x'
Conflicts: install.rb lib/puppet/defaults.rb man/man8/puppet.8
-rw-r--r--CHANGELOG59
-rw-r--r--Rakefile3
-rwxr-xr-xbin/puppetmasterd3
-rw-r--r--conf/redhat/puppet.spec2
-rwxr-xr-xext/puppet-test3
-rwxr-xr-xinstall.rb42
-rw-r--r--lib/puppet.rb2
-rw-r--r--lib/puppet/defaults.rb13
-rw-r--r--lib/puppet/file_serving/configuration/parser.rb6
-rw-r--r--lib/puppet/indirector/facts/facter.rb3
-rw-r--r--lib/puppet/indirector/node/ldap.rb3
-rw-r--r--lib/puppet/indirector/node/plain.rb7
-rw-r--r--lib/puppet/indirector/report/processor.rb3
-rw-r--r--lib/puppet/indirector/yaml.rb5
-rw-r--r--lib/puppet/metatype/evaluation.rb16
-rw-r--r--lib/puppet/metatype/providers.rb11
-rwxr-xr-xlib/puppet/network/authstore.rb3
-rw-r--r--lib/puppet/network/client.rb5
-rw-r--r--lib/puppet/network/client/master.rb6
-rw-r--r--lib/puppet/network/handler/master.rb2
-rwxr-xr-xlib/puppet/network/handler/report.rb3
-rw-r--r--lib/puppet/network/http/mongrel/rest.rb6
-rw-r--r--lib/puppet/network/http/webrick/rest.rb8
-rw-r--r--lib/puppet/network/http_pool.rb25
-rw-r--r--lib/puppet/node.rb2
-rw-r--r--lib/puppet/node/environment.rb3
-rw-r--r--lib/puppet/parser/parser_support.rb21
-rwxr-xr-xlib/puppet/provider/mailalias/aliases.rb5
-rwxr-xr-xlib/puppet/provider/package/openbsd.rb12
-rw-r--r--lib/puppet/provider/zone/solaris.rb3
-rw-r--r--lib/puppet/resource_reference.rb3
-rwxr-xr-xlib/puppet/type/host.rb3
-rw-r--r--lib/puppet/type/service.rb4
-rw-r--r--lib/puppet/util.rb3
-rw-r--r--lib/puppet/util/constant_inflector.rb3
-rw-r--r--lib/puppet/util/diff.rb4
-rw-r--r--lib/puppet/util/fileparsing.rb3
-rw-r--r--lib/puppet/util/tagging.rb3
-rw-r--r--man/man8/filebucket.8116
-rw-r--r--man/man8/pi.834
-rw-r--r--man/man8/puppet.882
-rw-r--r--man/man8/puppet.conf.81747
-rw-r--r--man/man8/puppetca.8116
-rw-r--r--man/man8/puppetd.8184
-rw-r--r--man/man8/puppetdoc.862
-rw-r--r--man/man8/puppetmasterd.887
-rw-r--r--man/man8/puppetrun.8151
-rw-r--r--man/man8/ralsh.8148
-rwxr-xr-xspec/unit/indirector/catalog/compiler.rb6
-rwxr-xr-xspec/unit/indirector/node/plain.rb6
-rwxr-xr-xspec/unit/indirector/yaml.rb1
-rw-r--r--spec/unit/network/client.rb43
-rwxr-xr-xspec/unit/network/http_pool.rb214
-rwxr-xr-xspec/unit/node.rb4
-rwxr-xr-xtest/language/parser.rb1
-rwxr-xr-xtest/network/client/client.rb29
-rwxr-xr-xtest/network/client/master.rb29
-rwxr-xr-xtest/network/handler/master.rb4
-rwxr-xr-xtest/ral/manager/provider.rb26
-rwxr-xr-xtest/ral/providers/mailalias/aliases.rb1
-rwxr-xr-xtest/ral/type/tidy.rb13
61 files changed, 3112 insertions, 303 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 50b88b4c5..2bd81df45 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,62 @@
+ Pass source to pkg_add via the PKG_PATH environment variable if
+ it ends in a '/' indicating it is a directory. Allows pkg_add
+ to resolve dependancies, and make it possible to specify packages
+ without version numbers.
+
+ Fixing #571 -- provider suitability is now checked at resource
+ evaluation time, rather than resource instantiation time. This
+ means that you don't catch your "errors" as early, but it also
+ means you should be able to realistically configure a whole host
+ in one run.
+
+ 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).
+
+ Ported #198 man page creation functionality to 0.24.x branch and
+ added man pages and man page creation logic to install.rb. The
+ man pages are stored in man/man8 and will install to config::CONFIG
+ mandir/man8.
+
+ Fixing #1138 -- the yamldir is automatically created by the
+ server now that it's in the :puppetmasterd section rather than
+ a separate :yaml section.
+
+ Disabling http keep-alive as a means of preventing #1010.
+ There is now a constant in Puppet::Network::HttpPool that will
+ disable or enable this feature, but note that we determined
+ that it can cause corruption, especially in file serving (but
+ it's client-side corruption).
+
+ Applying patch by Ryan McBride to fix OpenBSD package
+ matching. The actual problem was caused by the fix to #1001.
+
+ Found all instances of methods where split() is used without
+ any local variables and added a local variable -- see
+ http://snurl.com/21zf8. My own testing showed that this
+ caused memory growth to level off at a reasonable level.
+ Note that the link above says the problem is only with class
+ methods, but my own testing showed that it's any method that
+ meets these criteria. This is not a functional change, but
+ should hopefully be the last nail in the coffin of #1131.
+
+ Found an array that leaked pretty quickly between reparsing
+ files, thanks to work by Adam Jacob and Arjuna Christenson
+ (the finding, not the leak). I'm going to act like this
+ fixes #1131, at least for now, but I doubt it does,
+ since that shows general memory growth over time, whereas
+ the leak here should go away as soon as files are reparsed
+ (because the parser is holding the reference to the leaking
+ array).
+
+ Fixed #1147: Cached nodes are correctly considered out of
+ date if the node facts have been updated (thus causing
+ node facts to again be available in manifests, for those
+ cases where they were not).
+
+ Fixed #1137: The certificate name is correctly being added
+ to the facts hash.
+
Fixed #1136: Verbose and Debug no longer clobber each other.
Hopefully *finally* fixed the "already being managed" problem
diff --git a/Rakefile b/Rakefile
index 0f2a05b90..1a3faad09 100644
--- a/Rakefile
+++ b/Rakefile
@@ -27,7 +27,8 @@ project = Rake::RedLabProject.new("puppet") do |p|
'bin/**/*',
'ext/**/*',
'examples/**/*',
- 'conf/**/*'
+ 'conf/**/*',
+ 'man/**/*'
]
p.filelist.exclude("bin/pi")
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/conf/redhat/puppet.spec b/conf/redhat/puppet.spec
index 15390bb60..65cb4939c 100644
--- a/conf/redhat/puppet.spec
+++ b/conf/redhat/puppet.spec
@@ -7,7 +7,7 @@
Summary: A network tool for managing many disparate systems
Name: puppet
-Version: 0.24.3
+Version: 0.24.4
Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Base
diff --git a/ext/puppet-test b/ext/puppet-test
index 117a5a11a..dc0aeca92 100755
--- a/ext/puppet-test
+++ b/ext/puppet-test
@@ -216,10 +216,11 @@ end
Suite.new :local_catalog, "Local catalog handling" do
def prepare
+ @node = Puppet::Node.find(Puppet[:certname])
end
newtest :compile, "Compiled catalog" do
- Puppet::Node::Catalog.find(Puppet[:certname])
+ Puppet::Node::Catalog.find(@node)
end
end
diff --git a/install.rb b/install.rb
index 5d8ae2de0..d744f2d2d 100755
--- a/install.rb
+++ b/install.rb
@@ -58,7 +58,7 @@ rescue
puts "Missing rst2man; skipping man page creation"
$haveman = false
end
-
+
PREREQS = %w{openssl facter xmlrpc/client xmlrpc/server cgi}
InstallOptions = OpenStruct.new
@@ -76,6 +76,7 @@ sbins = glob(%w{sbin/*})
bins = glob(%w{bin/*})
rdoc = glob(%w{bin/* sbin/* lib/**/*.rb README README-library CHANGELOG TODO Install}).reject { |e| e=~ /\.(bat|cmd)$/ }
ri = glob(%w(bin/*.rb sbin/* lib/**/*.rb)).reject { |e| e=~ /\.(bat|cmd)$/ }
+man = glob(%w{man/man8/*})
libs = glob(%w{lib/**/*.rb lib/**/*.py})
tests = glob(%w{tests/**/*.rb})
@@ -96,6 +97,19 @@ def do_libs(libs, strip = 'lib/')
end
end
+def do_man(man, strip = 'man/')
+ man.each do |mf|
+ omf = File.join(InstallOptions.man_dir, mf.gsub(/#{strip}/, ''))
+ om = File.dirname(omf)
+ File.makedirs(om, true)
+ File.chmod(0644, om)
+ File.install(mf, omf, 0644, true)
+ gzip = %x{which gzip}
+ gzip.chomp!
+ %x{#{gzip} #{omf}}
+ end
+end
+
# Verify that all of the prereqs are installed
def check_prereqs
PREREQS.each { |pre|
@@ -124,6 +138,17 @@ def prepare_installation
InstallOptions.rdoc = false
InstallOptions.ri = false
end
+
+
+ if $haveman
+ InstallOptions.man = true
+ if RUBY_PLATFORM == "i386-mswin32"
+ InstallOptions.man = false
+ end
+ else
+ InstallOptions.man = false
+ end
+
InstallOptions.tests = true
if $haveman
@@ -145,7 +170,7 @@ def prepare_installation
InstallOptions.ri = onri
end
opts.on('--[no-]man', 'Presents the creation of man pages.', 'Default on.') do |onman|
- InstallOptions.man = onman
+ InstallOptions.man = onman
end
opts.on('--[no-]tests', 'Prevents the execution of unit tests.', 'Default on.') do |ontest|
InstallOptions.tests = ontest
@@ -188,15 +213,18 @@ def prepare_installation
if (destdir = ENV['DESTDIR'])
bindir = "#{destdir}#{Config::CONFIG['bindir']}"
sbindir = "#{destdir}#{Config::CONFIG['sbindir']}"
+ mandir = "#{destdir}#{Config::CONFIG['mandir']}"
sitelibdir = "#{destdir}#{sitelibdir}"
tmpdirs << bindir
FileUtils.makedirs(bindir)
FileUtils.makedirs(sbindir)
+ FileUtils.makedirs(mandir)
FileUtils.makedirs(sitelibdir)
else
bindir = Config::CONFIG['bindir']
sbindir = Config::CONFIG['sbindir']
+ mandir = Config::CONFIG['mandir']
tmpdirs << Config::CONFIG['bindir']
end
@@ -205,6 +233,7 @@ def prepare_installation
InstallOptions.bin_dir = bindir
InstallOptions.sbin_dir = sbindir
InstallOptions.lib_dir = libdir
+ InstallOptions.man_dir = mandir
end
##
@@ -251,13 +280,13 @@ def build_man(bins)
# Create binary man pages
bins.each do |bin|
b = bin.gsub( "bin/", "")
- %x{#{bin} --help > ./#{b}.rst}
+ %x{#{bin} --help > ./#{b}.rst}
%x{#{rst2man} ./#{b}.rst ./man/man8/#{b}.8}
- File.unlink("./#{b}.rst")
+ File.unlink("./#{b}.rst")
end
rescue SystemCallError
$stderr.puts "Couldn't build man pages: " + $!
- $stderr.puts "Continuing with install..."
+ $stderr.puts "Continuing with install..."
end
end
@@ -358,7 +387,8 @@ prepare_installation
run_tests(tests) if InstallOptions.tests
#build_rdoc(rdoc) if InstallOptions.rdoc
#build_ri(ri) if InstallOptions.ri
-build_man(bins) if InstallOptions.man
+#build_man(bins) if InstallOptions.man
do_bins(sbins, InstallOptions.sbin_dir)
do_bins(bins, InstallOptions.bin_dir)
do_libs(libs)
+do_man(man)
diff --git a/lib/puppet.rb b/lib/puppet.rb
index c1355e11c..cde25721e 100644
--- a/lib/puppet.rb
+++ b/lib/puppet.rb
@@ -25,7 +25,7 @@ require 'puppet/util/suidmanager'
# it's also a place to find top-level commands like 'debug'
module Puppet
- PUPPETVERSION = '0.24.3'
+ PUPPETVERSION = '0.24.4'
def Puppet.version
return PUPPETVERSION
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 8dcc46a8e..0f01c2ee2 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -346,11 +346,15 @@ module Puppet
:ssl_client_header => ["HTTP_X_CLIENT_DN", "The header containing an authenticated
client's SSL DN. Only used with Mongrel. This header must be set by the proxy
to the authenticated client's SSL DN (e.g., ``/CN=puppet.reductivelabs.com``).
- See the http://reductivelabs.com/puppet/trac/wiki/UsingMongrel page for more information."],
+ See http://reductivelabs.com/puppet/trac/wiki/UsingMongrel for more information."],
:ssl_client_verify_header => ["HTTP_X_CLIENT_VERIFY", "The header containing the status
message of the client verification. Only used with Mongrel. This header must be set by the proxy
to 'SUCCESS' if the client successfully authenticated, and anything else otherwise.
- See the http://reductivelabs.com/puppet/trac/wiki/UsingMongrel page for more information."]
+ See http://reductivelabs.com/puppet/trac/wiki/UsingMongrel for more information."],
+ # To make sure this directory is created before we try to use it on the server, we need
+ # it to be in the server section (#1138).
+ :yamldir => {:default => "$vardir/yaml", :owner => "$user", :group => "$user", :mode => "750",
+ :desc => "The directory in which YAML data is stored, usually in a subdirectory."}
)
self.setdefaults(:puppetd,
@@ -671,10 +675,5 @@ module Puppet
:rrdinterval => ["$runinterval", "How often RRD should expect data.
This should match how often the hosts report back to the server."]
)
-
- Puppet.setdefaults(:yaml,
- :yamldir => {:default => "$vardir/yaml", :owner => "$user", :group => "$user", :mode => "750",
- :desc => "The directory in which YAML data is stored, usually in a subdirectory."}
- )
end
diff --git a/lib/puppet/file_serving/configuration/parser.rb b/lib/puppet/file_serving/configuration/parser.rb
index 707c3f9b1..cda6889d4 100644
--- a/lib/puppet/file_serving/configuration/parser.rb
+++ b/lib/puppet/file_serving/configuration/parser.rb
@@ -62,7 +62,8 @@ class Puppet::FileServing::Configuration::Parser < Puppet::Util::LoadedFile
# Allow a given pattern access to a mount.
def allow(mount, value)
- value.split(/\s*,\s*/).each { |val|
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = value.split(/\s*,\s*/).each { |val|
begin
mount.info "allowing %s access" % val
mount.allow(val)
@@ -75,7 +76,8 @@ class Puppet::FileServing::Configuration::Parser < Puppet::Util::LoadedFile
# Deny a given pattern access to a mount.
def deny(mount, value)
- value.split(/\s*,\s*/).each { |val|
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = value.split(/\s*,\s*/).each { |val|
begin
mount.info "denying %s access" % val
mount.deny(val)
diff --git a/lib/puppet/indirector/facts/facter.rb b/lib/puppet/indirector/facts/facter.rb
index 5b9a7b3c0..a8c47e3bf 100644
--- a/lib/puppet/indirector/facts/facter.rb
+++ b/lib/puppet/indirector/facts/facter.rb
@@ -23,7 +23,8 @@ class Puppet::Node::Facts::Facter < Puppet::Indirector::Code
end
def self.loadfacts
- Puppet[:factpath].split(":").each do |dir|
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = Puppet[:factpath].split(":").each do |dir|
loaddir(dir, "fact")
end
end
diff --git a/lib/puppet/indirector/node/ldap.rb b/lib/puppet/indirector/node/ldap.rb
index 8537e1cf3..73b5cdd70 100644
--- a/lib/puppet/indirector/node/ldap.rb
+++ b/lib/puppet/indirector/node/ldap.rb
@@ -7,7 +7,8 @@ class Puppet::Node::Ldap < Puppet::Indirector::Ldap
# The attributes that Puppet class information is stored in.
def class_attributes
- Puppet[:ldapclassattrs].split(/\s*,\s*/)
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = Puppet[:ldapclassattrs].split(/\s*,\s*/)
end
# Look for our node in ldap.
diff --git a/lib/puppet/indirector/node/plain.rb b/lib/puppet/indirector/node/plain.rb
index d60cc3aa5..8058563e6 100644
--- a/lib/puppet/indirector/node/plain.rb
+++ b/lib/puppet/indirector/node/plain.rb
@@ -16,4 +16,11 @@ class Puppet::Node::Plain < Puppet::Indirector::Plain
node.fact_merge
node
end
+
+ # Use the version of the facts, since we assume that's the main thing
+ # that changes. If someone wants their own way of defining version,
+ # they can easily provide their own, um, version of this class.
+ def version(name)
+ Puppet::Node::Facts.version(name)
+ end
end
diff --git a/lib/puppet/indirector/report/processor.rb b/lib/puppet/indirector/report/processor.rb
index fd1bc413a..fa2b7f36b 100644
--- a/lib/puppet/indirector/report/processor.rb
+++ b/lib/puppet/indirector/report/processor.rb
@@ -45,6 +45,7 @@ class Puppet::Transaction::Report::Processor < Puppet::Indirector::Code
# Handle the parsing of the reports attribute.
def reports
- Puppet[:reports].gsub(/(^\s+)|(\s+$)/, '').split(/\s*,\s*/)
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = Puppet[:reports].gsub(/(^\s+)|(\s+$)/, '').split(/\s*,\s*/)
end
end
diff --git a/lib/puppet/indirector/yaml.rb b/lib/puppet/indirector/yaml.rb
index 4baeb38db..4dd29159e 100644
--- a/lib/puppet/indirector/yaml.rb
+++ b/lib/puppet/indirector/yaml.rb
@@ -2,11 +2,6 @@ require 'puppet/indirector/terminus'
# The base class for YAML indirection termini.
class Puppet::Indirector::Yaml < Puppet::Indirector::Terminus
- def initialize
- # Make sure our base directory exists.
- Puppet.settings.use(:yaml)
- end
-
# Read a given name's file in and convert it from YAML.
def find(name)
raise ArgumentError.new("You must specify the name of the object to retrieve") unless name
diff --git a/lib/puppet/metatype/evaluation.rb b/lib/puppet/metatype/evaluation.rb
index 36328c537..ff1eddb55 100644
--- a/lib/puppet/metatype/evaluation.rb
+++ b/lib/puppet/metatype/evaluation.rb
@@ -4,6 +4,11 @@ class Puppet::Type
# This returns any changes resulting from testing, thus 'collect' rather
# than 'each'.
def evaluate
+ if self.provider.is_a?(Puppet::Provider)
+ unless provider.class.suitable?
+ raise Puppet::Error, "Provider %s is not functional on this platform" % provider.class.name
+ end
+ end
#Puppet.err "Evaluating %s" % self.path.join(":")
unless defined? @evalcount
self.err "No evalcount defined on '%s' of type '%s'" %
@@ -125,14 +130,19 @@ class Puppet::Type
# the other properties matter.
changes = []
ensureparam = @parameters[:ensure]
- if @parameters.include?(:ensure) && !currentvalues.include?(ensureparam)
+
+ # This allows resource types to have 'ensure' be a parameter, which allows them to
+ # just pass the parameter on to other generated resources.
+ ensureparam = nil unless ensureparam.is_a?(Puppet::Property)
+ if ensureparam && !currentvalues.include?(ensureparam)
raise Puppet::DevError, "Parameter ensure defined but missing from current values"
end
- if @parameters.include?(:ensure) and ! ensureparam.insync?(currentvalues[ensureparam])
+
+ if ensureparam and ! ensureparam.insync?(currentvalues[ensureparam])
changes << Puppet::PropertyChange.new(ensureparam, currentvalues[ensureparam])
# Else, if the 'ensure' property is correctly absent, then do
# nothing
- elsif @parameters.include?(:ensure) and currentvalues[ensureparam] == :absent
+ elsif ensureparam and currentvalues[ensureparam] == :absent
return []
else
changes = properties().find_all { |property|
diff --git a/lib/puppet/metatype/providers.rb b/lib/puppet/metatype/providers.rb
index c302d9928..6308f7e54 100644
--- a/lib/puppet/metatype/providers.rb
+++ b/lib/puppet/metatype/providers.rb
@@ -188,15 +188,8 @@ class Puppet::Type
provider_class = provider_class.class.name
end
- if provider = @resource.class.provider(provider_class)
- unless provider.suitable?
- raise ArgumentError,
- "Provider '%s' is not functional on this platform" %
- [provider_class]
- end
- else
- raise ArgumentError, "Invalid %s provider '%s'" %
- [@resource.class.name, provider_class]
+ unless provider = @resource.class.provider(provider_class)
+ raise ArgumentError, "Invalid %s provider '%s'" % [@resource.class.name, provider_class]
end
end
diff --git a/lib/puppet/network/authstore.rb b/lib/puppet/network/authstore.rb
index c16bef32f..cb1fdc57d 100755
--- a/lib/puppet/network/authstore.rb
+++ b/lib/puppet/network/authstore.rb
@@ -235,7 +235,8 @@ module Puppet
# Convert the name to a common pattern.
def munge_name(name)
- name.downcase.split(".").reverse
+ # LAK:NOTE http://snurl.com/21zf8 [groups_google_com]
+ x = name.downcase.split(".").reverse
end
# Parse our input pattern and figure out what kind of allowal
diff --git a/lib/puppet/network/client.rb b/lib/puppet/network/client.rb
index cf1782f79..478883959 100644
--- a/lib/puppet/network/client.rb
+++ b/lib/puppet/network/client.rb
@@ -96,8 +96,9 @@ class Puppet::Network::Client
self.read_cert
# We have to start the HTTP connection manually before we start
- # sending it requests or keep-alive won't work.
- @driver.start if @driver.respond_to? :start
+ # sending it requests or keep-alive won't work. Note that with #1010,
+ # we don't currently actually want keep-alive.
+ @driver.start if @driver.respond_to? :start and Puppet::Network::HttpPool.keep_alive?
@local = false
elsif hash.include?(driverparam)
diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb
index e914d5c69..955acbfb5 100644
--- a/lib/puppet/network/client/master.rb
+++ b/lib/puppet/network/client/master.rb
@@ -50,7 +50,8 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
# Return the list of dynamic facts as an array of symbols
def self.dynamic_facts
- Puppet.settings[:dynamicfacts].split(/\s*,\s*/).collect { |fact| fact.downcase }
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = Puppet.settings[:dynamicfacts].split(/\s*,\s*/).collect { |fact| fact.downcase }
end
# Cache the config
@@ -425,7 +426,8 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
end
def self.loadfacts
- Puppet[:factpath].split(":").each do |dir|
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = Puppet[:factpath].split(":").each do |dir|
loaddir(dir, "fact")
end
end
diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb
index 3e004046e..dabfaca50 100644
--- a/lib/puppet/network/handler/master.rb
+++ b/lib/puppet/network/handler/master.rb
@@ -81,9 +81,9 @@ class Puppet::Network::Handler
clientip = facts["ipaddress"]
if Puppet[:node_name] == 'cert'
if name
+ client = name
facts["fqdn"] = client
facts["hostname"], facts["domain"] = client.split('.', 2)
- client = name
end
if ip
clientip = ip
diff --git a/lib/puppet/network/handler/report.rb b/lib/puppet/network/handler/report.rb
index 8ddeed9f6..b92b77ea5 100755
--- a/lib/puppet/network/handler/report.rb
+++ b/lib/puppet/network/handler/report.rb
@@ -79,7 +79,8 @@ class Puppet::Network::Handler
# Handle the parsing of the reports attribute.
def reports
- Puppet[:reports].gsub(/(^\s+)|(\s+$)/, '').split(/\s*,\s*/)
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = Puppet[:reports].gsub(/(^\s+)|(\s+$)/, '').split(/\s*,\s*/)
end
end
end
diff --git a/lib/puppet/network/http/mongrel/rest.rb b/lib/puppet/network/http/mongrel/rest.rb
index db63613ab..6c24e360c 100644
--- a/lib/puppet/network/http/mongrel/rest.rb
+++ b/lib/puppet/network/http/mongrel/rest.rb
@@ -14,11 +14,13 @@ class Puppet::Network::HTTP::MongrelREST < Puppet::Network::HTTP::Handler
end
def path(request)
- '/' + request.params[Mongrel::Const::REQUEST_PATH].split('/')[1]
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = '/' + request.params[Mongrel::Const::REQUEST_PATH].split('/')[1]
end
def request_key(request)
- request.params[Mongrel::Const::REQUEST_PATH].split('/')[2]
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = request.params[Mongrel::Const::REQUEST_PATH].split('/')[2]
end
def body(request)
diff --git a/lib/puppet/network/http/webrick/rest.rb b/lib/puppet/network/http/webrick/rest.rb
index dd0c84d61..8cda079e2 100644
--- a/lib/puppet/network/http/webrick/rest.rb
+++ b/lib/puppet/network/http/webrick/rest.rb
@@ -19,11 +19,13 @@ class Puppet::Network::HTTP::WEBrickREST < Puppet::Network::HTTP::Handler
end
def path(request)
- '/' + request.path.split('/')[1]
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = '/' + request.path.split('/')[1]
end
def request_key(request)
- request.path.split('/')[2]
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = request.path.split('/')[2]
end
def body(request)
@@ -38,4 +40,4 @@ class Puppet::Network::HTTP::WEBrickREST < Puppet::Network::HTTP::Handler
response.status = status
response.body = result
end
-end \ No newline at end of file
+end
diff --git a/lib/puppet/network/http_pool.rb b/lib/puppet/network/http_pool.rb
index 69574d8fd..9d37f2eeb 100644
--- a/lib/puppet/network/http_pool.rb
+++ b/lib/puppet/network/http_pool.rb
@@ -6,6 +6,15 @@ end
# Manage Net::HTTP instances for keep-alive.
module Puppet::Network::HttpPool
+ # 2008/03/23
+ # LAK:WARNING: Enabling this has a high propability of
+ # causing corrupt files and who knows what else. See #1010.
+ HTTP_KEEP_ALIVE = false
+
+ def self.keep_alive?
+ HTTP_KEEP_ALIVE
+ end
+
# This handles reading in the key and such-like.
extend Puppet::SSLCertificates::Support
@http_cache = {}
@@ -56,12 +65,14 @@ module Puppet::Network::HttpPool
# Return our cached instance if we've got a cache, as long as we're not
# resetting the instance.
- return @http_cache[key] if ! reset and @http_cache[key]
-
- # Clean up old connections if we have them.
- if http = @http_cache[key]
- @http_cache.delete(key)
- http.finish if http.started?
+ if keep_alive?
+ return @http_cache[key] if ! reset and @http_cache[key]
+
+ # Clean up old connections if we have them.
+ if http = @http_cache[key]
+ @http_cache.delete(key)
+ http.finish if http.started?
+ end
end
args = [host, port]
@@ -88,7 +99,7 @@ module Puppet::Network::HttpPool
cert_setup(http)
- @http_cache[key] = http
+ @http_cache[key] = http if keep_alive?
return http
end
diff --git a/lib/puppet/node.rb b/lib/puppet/node.rb
index 1091e5056..252ab961e 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/lib/puppet/node/environment.rb b/lib/puppet/node/environment.rb
index 2a314803f..343720a62 100644
--- a/lib/puppet/node/environment.rb
+++ b/lib/puppet/node/environment.rb
@@ -4,7 +4,8 @@ class Puppet::Node::Environment
# Return the list of valid environments. Just looks them up in
# the settings.
def self.valid
- Puppet.settings.value(:environments).split(",").collect { |e| e.to_sym }
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = Puppet.settings.value(:environments).split(",").collect { |e| e.to_sym }
end
# Is the provided environment valid?
diff --git a/lib/puppet/parser/parser_support.rb b/lib/puppet/parser/parser_support.rb
index ccfc4d48a..b86a4792b 100644
--- a/lib/puppet/parser/parser_support.rb
+++ b/lib/puppet/parser/parser_support.rb
@@ -123,13 +123,17 @@ class Puppet::Parser::Parser
def fqfind(namespace, name, table)
namespace = namespace.downcase
name = name.to_s.downcase
+
+ # If our classname is fully qualified or we have no namespace,
+ # just try directly for the class, and return either way.
if name =~ /^::/ or namespace == ""
classname = name.sub(/^::/, '')
- unless table[classname]
- self.load(classname)
- end
+ self.load(classname) unless table[classname]
return table[classname]
end
+
+ # Else, build our namespace up piece by piece, checking
+ # for the class in each namespace.
ary = namespace.split("::")
while ary.length > 0
@@ -221,7 +225,6 @@ class Puppet::Parser::Parser
return false if classname == ""
filename = classname.gsub("::", File::SEPARATOR)
- loaded = false
# First try to load the top-level module
mod = filename.scan(/^[\w-]+/).shift
unless @loaded.include?(mod)
@@ -229,24 +232,24 @@ class Puppet::Parser::Parser
begin
import(mod)
Puppet.info "Autoloaded module %s" % mod
- loaded = true
rescue Puppet::ImportError => detail
# We couldn't load the module
end
end
- unless filename == mod and ! @loaded.include?(mod)
- @loaded << mod
+ return true if classes.include?(classname)
+
+ unless @loaded.include?(filename)
+ @loaded << filename
# Then the individual file
begin
import(filename)
Puppet.info "Autoloaded file %s from module %s" % [filename, mod]
- loaded = true
rescue Puppet::ImportError => detail
# We couldn't load the file
end
end
- return loaded
+ return classes.include?(classname)
end
# Split an fq name into a namespace and name
diff --git a/lib/puppet/provider/mailalias/aliases.rb b/lib/puppet/provider/mailalias/aliases.rb
index 85dec29cc..8b5c45617 100755
--- a/lib/puppet/provider/mailalias/aliases.rb
+++ b/lib/puppet/provider/mailalias/aliases.rb
@@ -10,7 +10,10 @@ Puppet::Type.type(:mailalias).provide(:aliases,
record_line :aliases, :fields => %w{name recipient}, :separator => /\s*:\s*/, :block_eval => :instance do
def post_parse(record)
- record[:recipient] = record[:recipient].split(/\s*,\s*/).collect { |d| d.gsub(/^['"]|['"]$/, '') }
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ # It's not sufficient to assign to an existing hash.
+ recipient = record[:recipient].split(/\s*,\s*/).collect { |d| d.gsub(/^['"]|['"]$/, '') }
+ record[:recipient] = recipient
record
end
diff --git a/lib/puppet/provider/package/openbsd.rb b/lib/puppet/provider/package/openbsd.rb
index f76c37176..af590eb4d 100755
--- a/lib/puppet/provider/package/openbsd.rb
+++ b/lib/puppet/provider/package/openbsd.rb
@@ -2,6 +2,7 @@ require 'puppet/provider/package'
# Packaging on OpenBSD. Doesn't work anywhere else that I know of.
Puppet::Type.type(:package).provide :openbsd, :parent => Puppet::Provider::Package do
+ include Puppet::Util::Execution
desc "OpenBSD's form of ``pkg_add`` support."
commands :pkginfo => "pkg_info", :pkgadd => "pkg_add", :pkgdelete => "pkg_delete"
@@ -58,7 +59,14 @@ Puppet::Type.type(:package).provide :openbsd, :parent => Puppet::Provider::Packa
"You must specify a package source for BSD packages"
end
- pkgadd @resource[:source]
+ if @resource[:source] =~ /\/$/
+ withenv :PKG_PATH => @resource[:source] do
+ pkgadd @resource[:name]
+ end
+ else
+ pkgadd @resource[:source]
+ end
+
end
def query
@@ -67,7 +75,7 @@ Puppet::Type.type(:package).provide :openbsd, :parent => Puppet::Provider::Packa
# Search for the version info
if info =~ /Information for (inst:)?#{@resource[:name]}-(\S+)/
- hash[:ensure] = $1
+ hash[:ensure] = $2
else
return nil
end
diff --git a/lib/puppet/provider/zone/solaris.rb b/lib/puppet/provider/zone/solaris.rb
index dd8698b92..be2dd97f9 100644
--- a/lib/puppet/provider/zone/solaris.rb
+++ b/lib/puppet/provider/zone/solaris.rb
@@ -26,7 +26,8 @@ Puppet::Type.type(:zone).provide(:solaris) do
end
def self.instances
- adm(:list, "-cp").split("\n").collect do |line|
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = adm(:list, "-cp").split("\n").collect do |line|
new(line2hash(line))
end
end
diff --git a/lib/puppet/resource_reference.rb b/lib/puppet/resource_reference.rb
index 771a91be7..44b518816 100644
--- a/lib/puppet/resource_reference.rb
+++ b/lib/puppet/resource_reference.rb
@@ -49,7 +49,8 @@ class Puppet::ResourceReference
if value.nil? or value.to_s.downcase == "component"
@type = "Class"
else
- @type = value.to_s.split("::").collect { |s| s.capitalize }.join("::")
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = @type = value.to_s.split("::").collect { |s| s.capitalize }.join("::")
end
end
diff --git a/lib/puppet/type/host.rb b/lib/puppet/type/host.rb
index 868e41629..53365bf40 100755
--- a/lib/puppet/type/host.rb
+++ b/lib/puppet/type/host.rb
@@ -87,7 +87,8 @@ module Puppet
isnamevar
validate do |value|
- value.split('.').each do |hostpart|
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = value.split('.').each do |hostpart|
unless hostpart =~ /^([\d\w]+|[\d\w][\d\w\-]+[\d\w])$/
raise Puppet::Error, "Invalid host name"
end
diff --git a/lib/puppet/type/service.rb b/lib/puppet/type/service.rb
index 1b625cc41..560d81bae 100644
--- a/lib/puppet/type/service.rb
+++ b/lib/puppet/type/service.rb
@@ -113,7 +113,9 @@ module Puppet
munge do |value|
value = [value] unless value.is_a?(Array)
- paths = value.flatten.collect { |p| p.split(":") }.flatten.find_all do |path|
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ # It affects stand-alone blocks, too.
+ paths = value.flatten.collect { |p| x = p.split(":") }.flatten.find_all do |path|
if FileTest.directory?(path)
true
else
diff --git a/lib/puppet/util.rb b/lib/puppet/util.rb
index 2e83a08e9..560afe10b 100644
--- a/lib/puppet/util.rb
+++ b/lib/puppet/util.rb
@@ -226,7 +226,8 @@ module Util
return nil
end
else
- ENV['PATH'].split(":").each do |dir|
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = ENV['PATH'].split(":").each do |dir|
if FileTest.exists? File.join(dir, bin)
return File.join(dir, bin)
end
diff --git a/lib/puppet/util/constant_inflector.rb b/lib/puppet/util/constant_inflector.rb
index 8b083951f..eeeaa0632 100644
--- a/lib/puppet/util/constant_inflector.rb
+++ b/lib/puppet/util/constant_inflector.rb
@@ -5,7 +5,8 @@
# file names.
module Puppet::Util::ConstantInflector
def file2constant(file)
- file.split("/").collect { |name| name.capitalize }.join("::").gsub(/_+(.)/) { |term| $1.capitalize }
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = file.split("/").collect { |name| name.capitalize }.join("::").gsub(/_+(.)/) { |term| $1.capitalize }
end
def constant2file(constant)
diff --git a/lib/puppet/util/diff.rb b/lib/puppet/util/diff.rb
index e6ff57108..f37ea0850 100644
--- a/lib/puppet/util/diff.rb
+++ b/lib/puppet/util/diff.rb
@@ -27,7 +27,7 @@ module Puppet::Util::Diff
output = ""
- diffs = Diff::LCS.diff(data_old, data_new)
+ diffs = ::Diff::LCS.diff(data_old, data_new)
return output if diffs.empty?
oldhunk = hunk = nil
@@ -35,7 +35,7 @@ module Puppet::Util::Diff
diffs.each do |piece|
begin
- hunk = Diff::LCS::Hunk.new(data_old, data_new, piece,
+ hunk = ::Diff::LCS::Hunk.new(data_old, data_new, piece,
context_lines,
file_length_difference)
file_length_difference = hunk.file_length_difference
diff --git a/lib/puppet/util/fileparsing.rb b/lib/puppet/util/fileparsing.rb
index 8e39719c8..23d02ea60 100644
--- a/lib/puppet/util/fileparsing.rb
+++ b/lib/puppet/util/fileparsing.rb
@@ -223,7 +223,8 @@ module Puppet::Util::FileParsing
# Split text into separate lines using the record separator.
def lines(text)
# Remove any trailing separators, and then split based on them
- text.sub(/#{self.line_separator}\Q/,'').split(self.line_separator)
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ x = text.sub(/#{self.line_separator}\Q/,'').split(self.line_separator)
end
# Split a bunch of text into lines and then parse them individually.
diff --git a/lib/puppet/util/tagging.rb b/lib/puppet/util/tagging.rb
index 8a50f3458..e06e13a2c 100644
--- a/lib/puppet/util/tagging.rb
+++ b/lib/puppet/util/tagging.rb
@@ -16,7 +16,8 @@ module Puppet::Util::Tagging
@tags << tag unless @tags.include?(tag)
end
- qualified.collect { |name| name.split("::") }.flatten.each { |tag| @tags << tag unless @tags.include?(tag) }
+ # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
+ qualified.collect { |name| x = name.split("::") }.flatten.each { |tag| @tags << tag unless @tags.include?(tag) }
end
# Are we tagged with the provided tag?
diff --git a/man/man8/filebucket.8 b/man/man8/filebucket.8
new file mode 100644
index 000000000..fdaca9f31
--- /dev/null
+++ b/man/man8/filebucket.8
@@ -0,0 +1,116 @@
+.TH "" "" ""
+.SH NAME
+ \-
+
+.\" Man page generated from reStructeredText.
+
+.SH SYNOPSIS
+A stand\-alone Puppet filebucket client.
+
+
+.SH USAGE
+
+.\" visit_block_quote
+
+.TP
+.B filebucket [\-h|\-\-help] [\-V|\-\-version] [\-d|\-\-debug] [\-v|\-\-verbose]
+[\-l|\-\-local] [\-r|\-\-remote]
+[\-s|\-\-server <server>] [\-b|\-\-bucket <directory>] <file> <file> ...
+
+
+.\" depart_block_quote
+
+.SH DESCRIPTION
+This is a stand\-alone filebucket client for sending files to a local or
+central filebucket.
+
+
+.SH USAGE
+This client can operate in three modes, with only one mode per call:
+
+
+.TP
+.B backup: Send one or more files to the specified file bucket. Each sent
+file is printed with its resulting md5 sum.
+
+
+.TP
+.B get: Return the text associated with an md5 sum. The text is printed
+to stdout, and only one file can be retrieved at a time.
+
+
+.TP
+.B restore: Given a file path and an md5 sum, store the content associated
+with the sum into the specified file path. You can specify an
+entirely new path to this argument; you are not restricted to
+restoring the content to its original location.
+
+Note that +filebucket+ defaults to using a network\-based filebucket
+available on the server named +puppet+. To use this, you\'ll have to be
+running as a user with valid Puppet certificates. Alternatively, you can
+use your local file bucket by specifying +\-\-local+.
+
+
+.SH EXAMPLE
+
+.\" visit_block_quote
+$ filebucket backup /etc/passwd
+/etc/passwd: 429b225650b912a2ee067b0a4cf1e949
+$ filebucket restore /tmp/passwd 429b225650b912a2ee067b0a4cf1e949
+$
+
+
+.\" depart_block_quote
+
+.SH OPTIONS
+Note that any configuration parameter that\'s valid in the configuration
+file is also a valid long argument. For example, \'ssldir\' is a valid
+configuration parameter, so you can specify \'\-\-ssldir <directory>\' as an
+argument.
+
+See the configuration file documentation at
+http://reductivelabs.com/projects/puppet/reference/configref.html for
+the full list of acceptable parameters. A commented list of all
+configuration options can also be generated by running puppet with
+\'\-\-genconfig\'.
+
+debug: Enable full debugging.
+
+help: Print this help message
+
+
+.TP
+.B local: Use the local filebucket. This will use the default
+configuration information.
+
+
+.TP
+.B remote: Use a remote filebucket. This will use the default
+configuration information.
+
+server: The server to send the file to, instead of locally.
+
+verbose: Print extra information.
+
+version: Print version information.
+
+
+.SH EXAMPLE
+
+.\" visit_block_quote
+filebucket \-b /tmp/filebucket /my/file
+
+
+.\" depart_block_quote
+
+.SH AUTHOR
+Luke Kanies
+
+
+.SH COPYRIGHT
+Copyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public
+License
+
+
+.\" Generated by docutils manpage writer on 2008-03-22 17:46.
+.\"
diff --git a/man/man8/pi.8 b/man/man8/pi.8
new file mode 100644
index 000000000..da13d8e52
--- /dev/null
+++ b/man/man8/pi.8
@@ -0,0 +1,34 @@
+.TH "" "" ""
+.SH NAME
+ \-
+
+.\" Man page generated from reStructeredText.
+
+.TP
+.B bin/pi [options] [type]
+
+.TP
+.B Print documentation for puppet types and their parameters
+
+.TP
+.B \-l , \-\-list
+List all types
+
+
+.TP
+.B \-p , \-\-providers
+Describe providers in detail
+
+
+.TP
+.B \-s , \-\-short
+Only list parameters without detail
+
+
+.TP
+.B \-m , \-\-meta
+Include metaparams
+
+
+.\" Generated by docutils manpage writer on 2008-03-22 17:46.
+.\"
diff --git a/man/man8/puppet.8 b/man/man8/puppet.8
index 2eefc6a0a..0281d330e 100644
--- a/man/man8/puppet.8
+++ b/man/man8/puppet.8
@@ -20,81 +20,10 @@ Run a stand\-alone +puppet+ script.
.\" depart_block_quote
.SH DESCRIPTION
+This is the standalone puppet execution script; use it to execute
+individual scripts that you write. If you need to execute site\-wide
+scripts, use +puppetd+ and +puppetmasterd+.
-This document is intended as a secondary reference only. Please refer to the complete documentation on the
-.B puppet
-website:
-.PP
-\h"4"http://www.reductivelabs.com/trac/puppet/wiki/DocumentationStart
-.PP
-Every
-.B puppet
-executable (with the exception of
-.B puppetdoc
-) accepts all of the arguments below, but not all of the arguments make sense for every executable. Each argument has a section listed with it in parentheses; often, that section will map to an executable (e.g.,
-.B puppetd
-), in which case it probably only makes sense for that one executable. If
-.B puppet
-is listed as the section, it is most likely an option that is valid for everyone.
-.PP
-This will not always be the case. I have tried to be as thorough as possible in the descriptions of the arguments, so it should be obvious whether an argument is appropriate or not.
-.PP
-These arguments can be supplied to the executables either as command-line arugments or in the configuration file for the appropriate executable. For instance, the command-line invocation below would set the configuration directory to /private/puppet:
-.PP
-\h"4"$ puppetd --confdir=/private/puppet
-.PP
-Note that boolean options are turned on and off with a slightly different syntax on the command line:
-.PP
-\h"4"$ puppetd --storeconfigs
-.PP
-\h"4"$ puppetd --no-storeconfigs
-.PP
-The invocations above will enable and disable, respectively, the storage of the client configuration.
-.PP
-As mentioned above, the configuration parameters can also be stored in a configuration file located in the configuration directory (/etc/puppet by default). The file is called puppet.conf.
-.PP
-The file, which follows INI-style formatting, should contain a bracketed heading named for each executable, followed by pairs of parameters with their values. Here is an example of a very simple puppet.conf file:
-.PP
-\h"4"[puppetd]
-.br
-\h"4"confdir = /private/puppet
-.br
-\h"4"storeconfigs = true
-.br
-.PP
-Note that boolean parameters must be explicitly specified as true or false as seen above.
-.PP
-If you're starting out with a fresh configuration, you may wish to let the executable generate a template configuration file for you by invoking the executable in question with the --genconfig command. The executable will print a template configuration to standard output, which can be redirected to a file like so:
-.PP
-\h"4"$ puppetd --genconfig > /etc/puppet/puppet.conf
-.PP
-Note that this invocation will "clobber" (throw away) the contents of any pre-existing puppet.conf file, so make a backup of your present config if it contains valuable information.
-.PP
-Like the --genconfig argument, the executables also accept a --genmanifest argument, which will generate a manifest that can be used to manage all of
-.B Puppet's
-directories and files and prints it to standard output. This can likewise be redirected to a file:
-.PP
-\h"4"$ puppetd --genmanifest > /etc/puppet/manifests/site.pp
-.PP
-.B Puppet
-can also create user and group accounts for itself (one puppet group and one puppet user) if it is invoked as root with the --mkusers argument:
-.PP
-\h"4"$ puppetd --mkusers
-.PP
-.SH SIGNALS
-The
-.B puppetd
-and
-.B puppetmasterd
-executables catch some signals for special handling. Both daemons catch (SIGHUP), which forces the server to restart tself. Predictably, interrupt and terminate (SIGINT and SIGHUP) will shut down the server, whether it be an instance of
-.B puppetd
-or
-.B puppetmasterd.
-.PP
-Sending the SIGUSR1 signal to an instance of
-.B puppetd
-will cause it to immediately begin a new configuration transaction with the server. This signal has no effect on
-.B puppetmasterd.
.SH OPTIONS
Note that any configuration parameter that\'s valid in the configuration
@@ -138,12 +67,11 @@ puppet \-l /tmp/script.log script.pp
.SH AUTHOR
Luke Kanies
-
-
+.\" Generated by docutils manpage writer on 2008-01-20 10:28.
.SH COPYRIGHT
Copyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public
License
-.\" Generated by docutils manpage writer on 2008-01-20 10:28.
+.\" Generated by docutils manpage writer on 2008-03-22 17:46.
.\"
diff --git a/man/man8/puppet.conf.8 b/man/man8/puppet.conf.8
new file mode 100644
index 000000000..e8040fb8e
--- /dev/null
+++ b/man/man8/puppet.conf.8
@@ -0,0 +1,1747 @@
+.TH Configuration Reference "" "" ""
+.SH NAME
+Configuration Reference \-
+
+.\" Man page generated from reStructeredText.
+This page is autogenerated; any changes will get overwritten
+.I (last generated on Sat Mar 22 17:46:15 +1100 2008)
+
+
+
+.\" topic: Contents
+.\"
+.\" Specifying Configuration Parameters
+.\"
+.\" Signals
+.\"
+.\" Configuration Parameter Reference
+
+.SH Specifying Configuration Parameters
+
+.SS On The Command\-Line
+Every Puppet executable (with the exception of
+.\" visit_literal
+puppetdoc
+.\" depart_literal
+) accepts all of
+the parameters below, but not all of the arguments make sense for every executable.
+Each parameter has a section listed with it in parentheses; often, that section
+will map to an executable (e.g.,
+.\" visit_literal
+puppetd
+.\" depart_literal
+), in which case it probably only
+makes sense for that one executable. If
+.\" visit_literal
+main
+.\" depart_literal
+ is listed as the section,
+it is most likely an option that is valid for everyone.
+
+I have tried to be as thorough as possible in the descriptions of the
+arguments, so it should be obvious whether an argument is appropriate or not.
+
+These parameters can be supplied to the executables either as command\-line
+options or in the configuration file. For instance, the command\-line
+invocation below would set the configuration directory to
+.\" visit_literal
+/private/puppet
+.\" depart_literal
+:
+
+
+.nf
+$ puppetd \-\-confdir=/private/puppet
+.fi
+Note that boolean options are turned on and off with a slightly different
+syntax on the command line:
+
+
+.nf
+$ puppetd \-\-storeconfigs
+
+$ puppetd \-\-no\-storeconfigs
+.fi
+The invocations above will enable and disable, respectively, the storage of
+the client configuration.
+
+
+.SS Configuration Files
+As mentioned above, the configuration parameters can also be stored in a
+configuration file, located in the configuration directory. As root, the
+default configuration directory is
+.\" visit_literal
+/etc/puppet
+.\" depart_literal
+, and as a regular user, the
+default configuration directory is
+.\" visit_literal
+~user/.puppet
+.\" depart_literal
+. As of 0.23.0, all
+executables look for
+.\" visit_literal
+puppet.conf
+.\" depart_literal
+ in their configuration directory
+(although they previously looked for separate files). For example,
+
+.\" visit_literal
+puppet.conf
+.\" depart_literal
+ is located at
+.\" visit_literal
+/etc/puppet/puppet.conf
+.\" depart_literal
+ as root and
+
+.\" visit_literal
+~user/.puppet/puppet.conf
+.\" depart_literal
+ as a regular user by default.
+
+All executables will set any parameters set within the
+.\" visit_literal
+main
+.\" depart_literal
+ section,
+while each executable will also look for a section named for the executable
+and load those parameters. For example,
+.\" visit_literal
+puppetd
+.\" depart_literal
+ will look for a
+section named
+.\" visit_literal
+puppetd
+.\" depart_literal
+, and
+.\" visit_literal
+puppetmasterd
+.\" depart_literal
+ looks for a section
+named
+.\" visit_literal
+puppetmasterd
+.\" depart_literal
+. This allows you to use a single configuration file
+to customize the settings for all of your executables.
+
+
+.SS File Format
+The file follows INI\-style formatting. Here is an example of a very simple
+
+.\" visit_literal
+puppet.conf
+.\" depart_literal
+ file:
+
+
+.nf
+[main]
+ confdir = /private/puppet
+ storeconfigs = true
+.fi
+Note that boolean parameters must be explicitly specified as
+.I true
+ or
+
+.I false
+ as seen above.
+
+If you need to change file parameters (e.g., reset the mode or owner), do
+so within curly braces on the same line:
+
+
+.nf
+[main]
+ myfile = /tmp/whatever {owner = root, mode = 644}
+.fi
+If you\'re starting out with a fresh configuration, you may wish to let
+the executable generate a template configuration file for you by invoking
+the executable in question with the
+.I \-\-genconfig
+ command. The executable
+will print a template configuration to standard output, which can be
+redirected to a file like so:
+
+
+.nf
+$ puppetd \-\-genconfig > /etc/puppet/puppet.conf
+.fi
+Note that this invocation will replace the contents of any pre\-existing
+
+.I puppet.conf
+ file, so make a backup of your present config if it contains
+valuable information.
+
+All parameters will be under a single section heading matching the name of
+the process used to generate the configuraiton (\'puppetd\', in this case).
+
+Like the
+.I \-\-genconfig
+ argument, the executables also accept a
+.I \-\-genmanifest
+
+argument, which will generate a manifest that can be used to manage all of
+Puppet\'s directories and files and prints it to standard output. This can
+likewise be redirected to a file:
+
+
+.nf
+$ puppetd \-\-genmanifest > /etc/puppet/manifests/site.pp
+.fi
+Puppet can also create user and group accounts for itself (one
+.I puppet
+ group
+and one
+.I puppet
+ user) if it is invoked as
+.I root
+ with the
+.I \-\-mkusers
+ argument:
+
+
+.nf
+$ puppetd \-\-mkusers
+.fi
+
+.SH Signals
+The
+.\" visit_literal
+puppetd
+.\" depart_literal
+ and
+.\" visit_literal
+puppetmasterd
+.\" depart_literal
+ executables catch some signals for special
+handling. Both daemons catch (
+.\" visit_literal
+SIGHUP
+.\" depart_literal
+), which forces the server to restart
+tself. Predictably, interrupt and terminate (
+.\" visit_literal
+SIGINT
+.\" depart_literal
+ and
+.\" visit_literal
+SIGHUP
+.\" depart_literal
+) will shut
+down the server, whether it be an instance of
+.\" visit_literal
+puppetd
+.\" depart_literal
+ or
+.\" visit_literal
+puppetmasterd
+.\" depart_literal
+.
+
+Sending the
+.\" visit_literal
+SIGUSR1
+.\" depart_literal
+ signal to an instance of
+.\" visit_literal
+puppetd
+.\" depart_literal
+ will cause it to
+immediately begin a new configuration transaction with the server. This
+signal has no effect on
+.\" visit_literal
+puppetmasterd
+.\" depart_literal
+.
+
+
+.SH Configuration Parameter Reference
+Below is a list of all documented parameters. Not all of them are valid with all
+Puppet executables, but the executables will ignore any inappropriate values.
+
+
+.SS authconfig
+The configuration file that defines the rights to the different namespaces and methods. This can be used as a coarse\-grained authorization system for both
+.\" visit_literal
+puppetd
+.\" depart_literal
+ and
+.\" visit_literal
+puppetmasterd
+.\" depart_literal
+.
+
+
+.TP 2
+\(bu
+Default: $confdir/namespaceauth.conf
+
+
+.SS autoflush
+Whether log files should always flush to disk.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS autosign
+Whether to enable autosign. Valid values are true (which autosigns any key request, and is a very bad idea), false (which never autosigns any key request), and the path to a file, which uses that configuration file to determine which keys to sign.
+
+
+.TP 2
+\(bu
+Default: $confdir/autosign.conf
+
+
+.SS bindaddress
+The address to bind to. Mongrel servers default to 127.0.0.1 and WEBrick defaults to 0.0.0.0.
+
+
+.SS bucketdir
+Where FileBucket files are stored.
+
+
+.TP 2
+\(bu
+Default: $vardir/bucket
+
+
+.SS ca
+Wether the master should function as a certificate authority.
+
+
+.TP 2
+\(bu
+Default: true
+
+
+.SS ca_days
+How long a certificate should be valid. This parameter is deprecated, use ca_ttl instead
+
+
+.SS ca_md
+The type of hash used in certificates.
+
+
+.TP 2
+\(bu
+Default: md5
+
+
+.SS ca_port
+The port to use for the certificate authority.
+
+
+.TP 2
+\(bu
+Default: $masterport
+
+
+.SS ca_server
+The server to use for certificate authority requests. It\'s a separate server because it cannot and does not need to horizontally scale.
+
+
+.TP 2
+\(bu
+Default: $server
+
+
+.SS ca_ttl
+The default TTL for new certificates; valid values must be an integer, optionally followed by one of the units \'y\' (years of 365 days), \'d\' (days), \'h\' (hours), or \'s\' (seconds). The unit defaults to seconds. If this parameter is set, ca_days is ignored. Examples are \'3600\' (one hour) and \'1825d\', which is the same as \'5y\' (5 years)
+
+
+.TP 2
+\(bu
+Default: 5y
+
+
+.SS cacert
+The CA certificate.
+
+
+.TP 2
+\(bu
+Default: $cadir/ca_crt.pem
+
+
+.SS cacrl
+The certificate revocation list (CRL) for the CA. Set this to \'false\' if you do not want to use a CRL.
+
+
+.TP 2
+\(bu
+Default: $cadir/ca_crl.pem
+
+
+.SS cadir
+The root directory for the certificate authority.
+
+
+.TP 2
+\(bu
+Default: $ssldir/ca
+
+
+.SS cakey
+The CA private key.
+
+
+.TP 2
+\(bu
+Default: $cadir/ca_key.pem
+
+
+.SS capass
+Where the CA stores the password for the private key
+
+
+.TP 2
+\(bu
+Default: $caprivatedir/ca.pass
+
+
+.SS caprivatedir
+Where the CA stores private certificate information.
+
+
+.TP 2
+\(bu
+Default: $cadir/private
+
+
+.SS capub
+The CA public key.
+
+
+.TP 2
+\(bu
+Default: $cadir/ca_pub.pem
+
+
+.SS casesensitive
+Whether matching in case statements and selectors should be case\-sensitive. Case insensitivity is handled by downcasing all values before comparison.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS cert_inventory
+A Complete listing of all certificates
+
+
+.TP 2
+\(bu
+Default: $cadir/inventory.txt
+
+
+.SS certdir
+The certificate directory.
+
+
+.TP 2
+\(bu
+Default: $ssldir/certs
+
+
+.SS certdnsnames
+The DNS names on the Server certificate as a colon\-separated list. If it\'s anything other than an empty string, it will be used as an alias in the created certificate. By default, only the server gets an alias set up, and only for \'puppet\'.
+
+
+.SS certname
+The name to use when handling certificates. Defaults to the fully qualified domain name.
+
+
+.TP 2
+\(bu
+Default: absinthe.lovedthanlost.net
+
+
+.SS classfile
+The file in which puppetd stores a list of the classes associated with the retrieved configuration. Can be loaded in the separate
+.\" visit_literal
+puppet
+.\" depart_literal
+ executable using the
+.\" visit_literal
+\-\-loadclasses
+.\" depart_literal
+ option.
+
+
+.TP 2
+\(bu
+Default: $statedir/classes.txt
+
+
+.SS clientbucketdir
+Where FileBucket files are stored locally.
+
+
+.TP 2
+\(bu
+Default: $vardir/clientbucket
+
+
+.SS code
+Code to parse directly. This is essentially only used by
+.\" visit_literal
+puppet
+.\" depart_literal
+, and should only be set if you\'re writing your own Puppet executable
+
+
+.SS color
+Whether to use colors when logging to the console. Valid values are
+.\" visit_literal
+ansi
+.\" depart_literal
+ (equivalent to
+.\" visit_literal
+true
+.\" depart_literal
+),
+.\" visit_literal
+html
+.\" depart_literal
+ (mostly used during testing with TextMate), and
+.\" visit_literal
+false
+.\" depart_literal
+, which produces no color.
+
+
+.TP 2
+\(bu
+Default: ansi
+
+
+.SS confdir
+The main Puppet configuration directory. The default for this parameter is calculated based on the user. If the process is runnig as root or the user that
+.\" visit_literal
+puppetmasterd
+.\" depart_literal
+ is supposed to run as, it defaults to a system directory, but if it\'s running as any other user, it defaults to being in
+.\" visit_literal
+~
+.\" depart_literal
+.
+
+
+.TP 2
+\(bu
+Default: /etc/puppet
+
+
+.SS config
+The configuration file for puppetdoc.
+
+
+.TP 2
+\(bu
+Default: $confdir/puppet.conf
+
+
+.SS configprint
+Print the value of a specific configuration parameter. If a parameter is provided for this, then the value is printed and puppet exits. Comma\-separate multiple values. For a list of all values, specify \'all\'. This feature is only available in Puppet versions higher than 0.18.4.
+
+
+.SS configtimeout
+How long the client should wait for the configuration to be retrieved before considering it a failure. This can help reduce flapping if too many clients contact the server at one time.
+
+
+.TP 2
+\(bu
+Default: 120
+
+
+.SS csrdir
+Where the CA stores certificate requests
+
+
+.TP 2
+\(bu
+Default: $cadir/requests
+
+
+.SS daemonize
+Send the process into the background. This is the default.
+
+
+.TP 2
+\(bu
+Default: true
+
+
+.SS dbadapter
+The type of database to use.
+
+
+.TP 2
+\(bu
+Default: sqlite3
+
+
+.SS dblocation
+The database cache for client configurations. Used for querying within the language.
+
+
+.TP 2
+\(bu
+Default: $statedir/clientconfigs.sqlite3
+
+
+.SS dbmigrate
+Whether to automatically migrate the database.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS dbname
+The name of the database to use.
+
+
+.TP 2
+\(bu
+Default: puppet
+
+
+.SS dbpassword
+The database password for Client caching. Only used when networked databases are used.
+
+
+.TP 2
+\(bu
+Default: puppet
+
+
+.SS dbserver
+The database server for Client caching. Only used when networked databases are used.
+
+
+.TP 2
+\(bu
+Default: localhost
+
+
+.SS dbsocket
+The database socket location. Only used when networked databases are used. Will be ignored if the value is an empty string.
+
+
+.SS dbuser
+The database user for Client caching. Only used when networked databases are used.
+
+
+.TP 2
+\(bu
+Default: puppet
+
+
+.SS diff
+Which diff command to use when printing differences between files.
+
+
+.TP 2
+\(bu
+Default: diff
+
+
+.SS diff_args
+Which arguments to pass to the diff command when printing differences between files.
+
+
+.SS downcasefacts
+Whether facts should be made all lowercase when sent to the server.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS dynamicfacts
+Facts that are dynamic; these facts will be ignored when deciding whether changed facts should result in a recompile. Multiple facts should be comma\-separated.
+
+
+.TP 2
+\(bu
+Default: memorysize,memoryfree,swapsize,swapfree
+
+
+.SS environment
+The environment Puppet is running in. For clients (e.g.,
+.\" visit_literal
+puppetd
+.\" depart_literal
+) this determines the environment itself, which is used to find modules and much more. For servers (i.e.,
+.\" visit_literal
+puppetmasterd
+.\" depart_literal
+) this provides the default environment for nodes we know nothing about.
+
+
+.TP 2
+\(bu
+Default: development
+
+
+.SS environments
+The valid environments for Puppet clients. This is more useful as a server\-side setting than client, but any environment chosen must be in this list. Values should be separated by a comma.
+
+
+.TP 2
+\(bu
+Default: production,development
+
+
+.SS evaltrace
+Whether each resource should log when it is being evaluated. This allows you to interactively see exactly what is being done.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS external_nodes
+An external command that can produce node information. The output must be a YAML dump of a hash, and that hash must have one or both of
+.\" visit_literal
+classes
+.\" depart_literal
+ and
+.\" visit_literal
+parameters
+.\" depart_literal
+, where
+.\" visit_literal
+classes
+.\" depart_literal
+ is an array and
+.\" visit_literal
+parameters
+.\" depart_literal
+ is a hash. For unknown nodes, the commands should exit with a non\-zero exit code. This command makes it straightforward to store your node mapping information in other data sources like databases.
+
+
+.TP 2
+\(bu
+Default: none
+
+
+.SS factdest
+Where Puppet should store facts that it pulls down from the central server.
+
+
+.TP 2
+\(bu
+Default: $vardir/facts
+
+
+.SS factpath
+Where Puppet should look for facts. Multiple directories should be colon\-separated, like normal PATH variables.
+
+
+.TP 2
+\(bu
+Default: $vardir/facts
+
+
+.SS factsignore
+What files to ignore when pulling down facts.
+
+
+.TP 2
+\(bu
+Default: .svn CVS
+
+
+.SS factsource
+From where to retrieve facts. The standard Puppet
+.\" visit_literal
+file
+.\" depart_literal
+ type is used for retrieval, so anything that is a valid file source can be used here.
+
+
+.TP 2
+\(bu
+Default: puppet://$server/facts
+
+
+.SS factsync
+Whether facts should be synced with the central server.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS fileserverconfig
+Where the fileserver configuration is stored.
+
+
+.TP 2
+\(bu
+Default: $confdir/fileserver.conf
+
+
+.SS filetimeout
+The minimum time to wait (in seconds) between checking for updates in configuration files. This timeout determines how quickly Puppet checks whether a file (such as manifests or templates) has changed on disk.
+
+
+.TP 2
+\(bu
+Default: 15
+
+
+.SS genconfig
+Whether to just print a configuration to stdout and exit. Only makes sense when used interactively. Takes into account arguments specified on the CLI.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS genmanifest
+Whether to just print a manifest to stdout and exit. Only makes sense when used interactively. Takes into account arguments specified on the CLI.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS graph
+Whether to create dot graph files for the different configuration graphs. These dot files can be interpreted by tools like OmniGraffle or dot (which is part of ImageMagick).
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS graphdir
+Where to store dot\-outputted graphs.
+
+
+.TP 2
+\(bu
+Default: $statedir/graphs
+
+
+.SS group
+The group puppetmasterd should run as.
+
+
+.TP 2
+\(bu
+Default: puppet
+
+
+.SS hostcert
+Where individual hosts store and look for their certificates.
+
+
+.TP 2
+\(bu
+Default: $certdir/$certname.pem
+
+
+.SS hostcsr
+Where individual hosts store and look for their certificates.
+
+
+.TP 2
+\(bu
+Default: $ssldir/csr_$certname.pem
+
+
+.SS hostprivkey
+Where individual hosts store and look for their private key.
+
+
+.TP 2
+\(bu
+Default: $privatekeydir/$certname.pem
+
+
+.SS hostpubkey
+Where individual hosts store and look for their public key.
+
+
+.TP 2
+\(bu
+Default: $publickeydir/$certname.pem
+
+
+.SS http_enable_post_connection_check
+Boolean; wheter or not puppetd should validate the server SSL certificate against the request hostname.
+
+
+.TP 2
+\(bu
+Default: true
+
+
+.SS http_proxy_host
+The HTTP proxy host to use for outgoing connections. Note: You may need to use a FQDN for the server hostname when using a proxy.
+
+
+.TP 2
+\(bu
+Default: none
+
+
+.SS http_proxy_port
+The HTTP proxy port to use for outgoing connections
+
+
+.TP 2
+\(bu
+Default: 3128
+
+
+.SS httplog
+Where the puppetd web server logs.
+
+
+.TP 2
+\(bu
+Default: $logdir/http.log
+
+
+.SS ignorecache
+Ignore cache and always recompile the configuration. This is useful for testing new configurations, where the local cache may in fact be stale even if the timestamps are up to date \- if the facts change or if the server changes.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS ignoreimport
+A parameter that can be used in commit hooks, since it enables you to parse\-check a single file rather than requiring that all files exist.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS ignoreschedules
+Boolean; whether puppetd should ignore schedules. This is useful for initial puppetd runs.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS keylength
+The bit length of keys.
+
+
+.TP 2
+\(bu
+Default: 1024
+
+
+.SS ldapattrs
+The LDAP attributes to include when querying LDAP for nodes. All returned attributes are set as variables in the top\-level scope. Multiple values should be comma\-separated. The value \'all\' returns all attributes.
+
+
+.TP 2
+\(bu
+Default: all
+
+
+.SS ldapbase
+The search base for LDAP searches. It\'s impossible to provide a meaningful default here, although the LDAP libraries might have one already set. Generally, it should be the \'ou=Hosts\' branch under your main directory.
+
+
+.SS ldapclassattrs
+The LDAP attributes to use to define Puppet classes. Values should be comma\-separated.
+
+
+.TP 2
+\(bu
+Default: puppetclass
+
+
+.SS ldapnodes
+Whether to search for node configurations in LDAP. See http://reductivelabs.com/puppet/trac/wiki/LdapNodes/ for more information.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS ldapparentattr
+The attribute to use to define the parent node.
+
+
+.TP 2
+\(bu
+Default: parentnode
+
+
+.SS ldappassword
+The password to use to connect to LDAP.
+
+
+.SS ldapport
+The LDAP port. Only used if
+.\" visit_literal
+ldapnodes
+.\" depart_literal
+ is enabled.
+
+
+.TP 2
+\(bu
+Default: 389
+
+
+.SS ldapserver
+The LDAP server. Only used if
+.\" visit_literal
+ldapnodes
+.\" depart_literal
+ is enabled.
+
+
+.TP 2
+\(bu
+Default: ldap
+
+
+.SS ldapssl
+Whether SSL should be used when searching for nodes. Defaults to false because SSL usually requires certificates to be set up on the client side.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS ldapstring
+The search string used to find an LDAP node.
+
+
+.TP 2
+\(bu
+Default: (&(objectclass=puppetClient)(cn=%s))
+
+
+.SS ldaptls
+Whether TLS should be used when searching for nodes. Defaults to false because TLS usually requires certificates to be set up on the client side.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS ldapuser
+The user to use to connect to LDAP. Must be specified as a full DN.
+
+
+.SS lexical
+Whether to use lexical scoping (vs. dynamic).
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS libdir
+An extra search path for Puppet. This is only useful for those files that Puppet will load on demand, and is only guaranteed to work for those cases. In fact, the autoload mechanism is responsible for making sure this directory is in Ruby\'s search path
+
+
+.TP 2
+\(bu
+Default: $vardir/lib
+
+
+.SS listen
+Whether puppetd should listen for connections. If this is true, then by default only the
+.\" visit_literal
+runner
+.\" depart_literal
+ server is started, which allows remote authorized and authenticated nodes to connect and trigger
+.\" visit_literal
+puppetd
+.\" depart_literal
+ runs.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS localcacert
+Where each client stores the CA certificate.
+
+
+.TP 2
+\(bu
+Default: $certdir/ca.pem
+
+
+.SS localconfig
+Where puppetd caches the local configuration. An extension indicating the cache format is added automatically.
+
+
+.TP 2
+\(bu
+Default: $statedir/localconfig
+
+
+.SS logdir
+The Puppet log directory.
+
+
+.TP 2
+\(bu
+Default: $vardir/log
+
+
+.SS manifest
+The entry\-point manifest for puppetmasterd.
+
+
+.TP 2
+\(bu
+Default: $manifestdir/site.pp
+
+
+.SS manifestdir
+Where puppetmasterd looks for its manifests.
+
+
+.TP 2
+\(bu
+Default: $confdir/manifests
+
+
+.SS masterhttplog
+Where the puppetmasterd web server logs.
+
+
+.TP 2
+\(bu
+Default: $logdir/masterhttp.log
+
+
+.SS masterlog
+Where puppetmasterd logs. This is generally not used, since syslog is the default log destination.
+
+
+.TP 2
+\(bu
+Default: $logdir/puppetmaster.log
+
+
+.SS masterport
+Which port puppetmasterd listens on.
+
+
+.TP 2
+\(bu
+Default: 8140
+
+
+.SS maximum_uid
+The maximum allowed UID. Some platforms use negative UIDs but then ship with tools that do not know how to handle signed ints, so the UIDs show up as huge numbers that can then not be fed back into the system. This is a hackish way to fail in a slightly more useful way when that happens.
+
+
+.TP 2
+\(bu
+Default: 4294967290
+
+
+.SS mkusers
+Whether to create the necessary user and group that puppetd will run as.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS modulepath
+The search path for modules as a colon\-separated list of directories.
+
+
+.TP 2
+\(bu
+Default: $confdir/modules:/usr/share/puppet/modules
+
+
+.SS name
+The name of the service, if we are running as one. The default is essentially $0 without the path or
+.\" visit_literal
+.rb
+.\" depart_literal
+.
+
+
+.TP 2
+\(bu
+Default: puppetdoc
+
+
+.SS node_name
+How the puppetmaster determines the client\'s identity and sets the \'hostname\', \'fqdn\' and \'domain\' facts for use in the manifest, in particular for determining which \'node\' statement applies to the client. Possible values are \'cert\' (use the subject\'s CN in the client\'s certificate) and \'facter\' (use the hostname that the client reported in its facts)
+
+
+.TP 2
+\(bu
+Default: cert
+
+
+.SS node_terminus
+Where to find information about nodes.
+
+
+.TP 2
+\(bu
+Default: plain
+
+
+.SS noop
+Whether puppetd should be run in noop mode.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS paramcheck
+Whether to validate parameters during parsing.
+
+
+.TP 2
+\(bu
+Default: true
+
+
+.SS parseonly
+Just check the syntax of the manifests.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS passfile
+Where puppetd stores the password for its private key. Generally unused.
+
+
+.TP 2
+\(bu
+Default: $privatedir/password
+
+
+.SS path
+The shell search path. Defaults to whatever is inherited from the parent process.
+
+
+.TP 2
+\(bu
+Default: none
+
+
+.SS pidfile
+The pid file
+
+
+.SS plugindest
+Where Puppet should store plugins that it pulls down from the central server.
+
+
+.TP 2
+\(bu
+Default: $libdir
+
+
+.SS pluginpath
+Where Puppet should look for plugins. Multiple directories should be colon\-separated, like normal PATH variables. As of 0.23.1, this option is deprecated; download your custom libraries to the $libdir instead.
+
+
+.TP 2
+\(bu
+Default: $vardir/plugins
+
+
+.SS pluginsignore
+What files to ignore when pulling down plugins.
+
+
+.TP 2
+\(bu
+Default: .svn CVS
+
+
+.SS pluginsource
+From where to retrieve plugins. The standard Puppet
+.\" visit_literal
+file
+.\" depart_literal
+ type is used for retrieval, so anything that is a valid file source can be used here.
+
+
+.TP 2
+\(bu
+Default: puppet://$server/plugins
+
+
+.SS pluginsync
+Whether plugins should be synced with the central server.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS privatedir
+Where the client stores private certificate information.
+
+
+.TP 2
+\(bu
+Default: $ssldir/private
+
+
+.SS privatekeydir
+The private key directory.
+
+
+.TP 2
+\(bu
+Default: $ssldir/private_keys
+
+
+.SS publickeydir
+The public key directory.
+
+
+.TP 2
+\(bu
+Default: $ssldir/public_keys
+
+
+.SS puppetdlockfile
+A lock file to temporarily stop puppetd from doing anything.
+
+
+.TP 2
+\(bu
+Default: $statedir/puppetdlock
+
+
+.SS puppetdlog
+The log file for puppetd. This is generally not used.
+
+
+.TP 2
+\(bu
+Default: $logdir/puppetd.log
+
+
+.SS puppetport
+Which port puppetd listens on.
+
+
+.TP 2
+\(bu
+Default: 8139
+
+
+.SS rails_loglevel
+The log level for Rails connections. The value must be a valid log level within Rails. Production environments normally use
+.\" visit_literal
+info
+.\" depart_literal
+ and other environments normally use
+.\" visit_literal
+debug
+.\" depart_literal
+.
+
+
+.TP 2
+\(bu
+Default: info
+
+
+.SS railslog
+Where Rails\-specific logs are sent
+
+
+.TP 2
+\(bu
+Default: $logdir/rails.log
+
+
+.SS report
+Whether to send reports after every transaction.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS reportdir
+The directory in which to store reports received from the client. Each client gets a separate subdirectory.
+
+
+.TP 2
+\(bu
+Default: $vardir/reports
+
+
+.SS reportfrom
+The \'from\' email address for the reports.
+
+
+.TP 2
+\(bu
+Default: report@absinthe.lovedthanlost.net
+
+
+.SS reports
+The list of reports to generate. All reports are looked for in puppet/reports/<name>.rb, and multiple report names should be comma\-separated (whitespace is okay).
+
+
+.TP 2
+\(bu
+Default: store
+
+
+.SS reportserver
+The server to which to send transaction reports.
+
+
+.TP 2
+\(bu
+Default: $server
+
+
+.SS req_bits
+The bit length of the certificates.
+
+
+.TP 2
+\(bu
+Default: 2048
+
+
+.SS rrddir
+The directory where RRD database files are stored. Directories for each reporting host will be created under this directory.
+
+
+.TP 2
+\(bu
+Default: $vardir/rrd
+
+
+.SS rrdgraph
+Whether RRD information should be graphed.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS rrdinterval
+How often RRD should expect data. This should match how often the hosts report back to the server.
+
+
+.TP 2
+\(bu
+Default: $runinterval
+
+
+.SS rundir
+Where Puppet PID files are kept.
+
+
+.TP 2
+\(bu
+Default: $vardir/run
+
+
+.SS runinterval
+How often puppetd applies the client configuration; in seconds.
+
+
+.TP 2
+\(bu
+Default: 1800
+
+
+.SS sendmail
+Where to find the sendmail binary with which to send email.
+
+
+.SS serial
+Where the serial number for certificates is stored.
+
+
+.TP 2
+\(bu
+Default: $cadir/serial
+
+
+.SS server
+The server to which server puppetd should connect
+
+
+.TP 2
+\(bu
+Default: puppet
+
+
+.SS servertype
+The type of server to use. Currently supported options are webrick and mongrel. If you use mongrel, you will need a proxy in front of the process or processes, since Mongrel cannot speak SSL.
+
+
+.TP 2
+\(bu
+Default: webrick
+
+
+.SS show_diff
+Whether to print a contextual diff when files are being replaced. The diff is printed on stdout, so this option is meaningless unless you are running Puppet interactively. This feature currently requires the
+.\" visit_literal
+diff/lcs
+.\" depart_literal
+ Ruby library.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS signeddir
+Where the CA stores signed certificates.
+
+
+.TP 2
+\(bu
+Default: $cadir/signed
+
+
+.SS smtpserver
+The server through which to send email reports.
+
+
+.TP 2
+\(bu
+Default: none
+
+
+.SS splay
+Whether to sleep for a pseudo\-random (but consistent) amount of time before a run.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS splaylimit
+The maximum time to delay before runs. Defaults to being the same as the run interval.
+
+
+.TP 2
+\(bu
+Default: $runinterval
+
+
+.SS ssl_client_header
+The header containing an authenticated client\'s SSL DN. Only used with Mongrel. This header must be set by the proxy to the authenticated client\'s SSL DN (e.g.,
+.\" visit_literal
+/CN=puppet.reductivelabs.com
+.\" depart_literal
+). See http://reductivelabs.com/puppet/trac/wiki/UsingMongrel for more information.
+
+
+.TP 2
+\(bu
+Default: HTTP_X_CLIENT_DN
+
+
+.SS ssl_client_verify_header
+The header containing the status message of the client verification. Only used with Mongrel. This header must be set by the proxy to \'SUCCESS\' if the client successfully authenticated, and anything else otherwise. See http://reductivelabs.com/puppet/trac/wiki/UsingMongrel for more information.
+
+
+.TP 2
+\(bu
+Default: HTTP_X_CLIENT_VERIFY
+
+
+.SS ssldir
+Where SSL certificates are kept.
+
+
+.TP 2
+\(bu
+Default: $confdir/ssl
+
+
+.SS statedir
+The directory where Puppet state is stored. Generally, this directory can be removed without causing harm (although it might result in spurious service restarts).
+
+
+.TP 2
+\(bu
+Default: $vardir/state
+
+
+.SS statefile
+Where puppetd and puppetmasterd store state associated with the running configuration. In the case of puppetmasterd, this file reflects the state discovered through interacting with clients.
+
+
+.TP 2
+\(bu
+Default: $statedir/state.yaml
+
+
+.SS storeconfigs
+Whether to store each client\'s configuration. This requires ActiveRecord from Ruby on Rails.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS summarize
+Whether to print a transaction summary.
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS syslogfacility
+What syslog facility to use when logging to syslog. Syslog has a fixed list of valid facilities, and you must choose one of those; you cannot just make one up.
+
+
+.TP 2
+\(bu
+Default: daemon
+
+
+.SS tagmap
+The mapping between reporting tags and email addresses.
+
+
+.TP 2
+\(bu
+Default: $confdir/tagmail.conf
+
+
+.SS tags
+Tags to use to find resources. If this is set, then only resources tagged with the specified tags will be applied. Values must be comma\-separated.
+
+
+.SS templatedir
+Where Puppet looks for template files.
+
+
+.TP 2
+\(bu
+Default: $vardir/templates
+
+
+.SS trace
+Whether to print stack traces on some errors
+
+
+.TP 2
+\(bu
+Default: false
+
+
+.SS typecheck
+Whether to validate types during parsing.
+
+
+.TP 2
+\(bu
+Default: true
+
+
+.SS usecacheonfailure
+Whether to use the cached configuration when the remote configuration will not compile. This option is useful for testing new configurations, where you want to fix the broken configuration rather than reverting to a known\-good one.
+
+
+.TP 2
+\(bu
+Default: true
+
+
+.SS user
+The user puppetmasterd should run as.
+
+
+.TP 2
+\(bu
+Default: puppet
+
+
+.SS vardir
+Where Puppet stores dynamic and growing data. The default for this parameter is calculated specially, like confdir.
+
+
+.TP 2
+\(bu
+Default: /var/puppet
+
+
+.SS yamldir
+The directory in which YAML data is stored, usually in a subdirectory.
+
+
+.TP 2
+\(bu
+Default: $vardir/yaml
+
+
+.sp
+.ce
+----
+
+.ce 0
+.sp
+
+.I This page autogenerated on Sat Mar 22 17:46:15 +1100 2008
+
+
+
+.\" Generated by docutils manpage writer on 2008-03-22 17:46.
+.\"
diff --git a/man/man8/puppetca.8 b/man/man8/puppetca.8
new file mode 100644
index 000000000..42d6c1f1f
--- /dev/null
+++ b/man/man8/puppetca.8
@@ -0,0 +1,116 @@
+.TH "" "" ""
+.SH NAME
+ \-
+
+.\" Man page generated from reStructeredText.
+
+.SH SYNOPSIS
+Stand\-alone certificate authority. Capable of generating certificates
+but mostly meant for signing certificate requests from puppet clients.
+
+
+.SH USAGE
+
+.\" visit_block_quote
+
+.TP
+.B puppetca [\-h|\-\-help] [\-V|\-\-version] [\-d|\-\-debug] [\-v|\-\-verbose]
+[\-g|\-\-generate] [\-l|\-\-list] [\-s|\-\-sign] [\-r|\-\-revoke]
+[\-p|\-\-print] [\-c|\-\-clean] [\-\-verify] [host]
+
+
+.\" depart_block_quote
+
+.SH DESCRIPTION
+Because the puppetmasterd daemon defaults to not signing client
+certificate requests, this script is available for signing outstanding
+requests. It can be used to list outstanding requests and then either
+sign them individually or sign all of them.
+
+
+.SH OPTIONS
+Note that any configuration parameter that\'s valid in the configuration
+file is also a valid long argument. For example, \'ssldir\' is a valid
+configuration parameter, so you can specify \'\-\-ssldir <directory>\' as an
+argument.
+
+See the configuration file documentation at
+http://reductivelabs.com/projects/puppet/reference/configref.html for
+the full list of acceptable parameters. A commented list of all
+configuration options can also be generated by running puppetca with
+\'\-\-genconfig\'.
+
+
+.TP
+.B all: Operate on all outstanding requests. Only makes sense with
+\'\-\-sign\', or \'\-\-list\'.
+
+
+.TP
+.B clean: Remove all files related to a host from puppetca\'s storage.
+This is useful when rebuilding hosts, since new certificate
+signing requests will only be honored if puppetca does not
+have a copy of a signed certificate for that host. The
+certificate of the host remains valid.
+
+debug: Enable full debugging.
+
+
+.TP
+.B generate: Generate a certificate for a named client. A
+certificate/keypair will be generated for each client named on
+the command line.
+
+help: Print this help message
+
+
+.TP
+.B list: List outstanding certificate requests. If \'\-\-all\' is
+specified, signed certificates are also listed, prefixed by
+\'+\'.
+
+print: Print the full\-text version of a host\'s certificate.
+
+
+.TP
+.B revoke: Revoke the certificate of a client. The certificate can be
+specified either by its serial number, given as a decimal
+number or a hexadecimal number prefixed by \'0x\', or by its
+hostname. The certificate is revoked by adding it to the
+Certificate Revocation List given by the \'cacrl\' config
+parameter. Note that the puppetmasterd needs to be restarted
+after revoking certificates.
+
+
+.TP
+.B sign: Sign an outstanding certificate request. Unless \'\-\-all\' is
+specified, hosts must be listed after all flags.
+
+verbose: Enable verbosity.
+
+version: Print the puppet version number and exit.
+
+verify: Verify the named certificate against the local CA certificate.
+
+
+.SH EXAMPLE
+
+.\" visit_block_quote
+$ puppetca \-l
+culain.madstop.com
+$ puppetca \-s culain.madstop.com
+
+
+.\" depart_block_quote
+
+.SH AUTHOR
+Luke Kanies
+
+
+.SH COPYRIGHT
+Copyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public
+License
+
+
+.\" Generated by docutils manpage writer on 2008-03-22 17:46.
+.\"
diff --git a/man/man8/puppetd.8 b/man/man8/puppetd.8
new file mode 100644
index 000000000..83b172809
--- /dev/null
+++ b/man/man8/puppetd.8
@@ -0,0 +1,184 @@
+.TH Synopsis "" "" ""
+.SH NAME
+Synopsis \-
+
+.\" Man page generated from reStructeredText.
+Retrieve the client configuration from the central puppet server and
+apply it to the local host.
+
+Currently must be run out periodically, using cron or something similar.
+
+
+.SH USAGE
+
+.\" visit_block_quote
+
+.TP
+.B puppetd [\-D|\-\-daemonize|\-\-no\-daemonize] [\-d|\-\-debug] [\-\-disable] [\-\-enable]
+[\-h|\-\-help] [\-\-fqdn <host name>] [\-l|\-\-logdest syslog|<file>|console]
+[\-o|\-\-onetime] [\-\-serve <handler>] [\-t|\-\-test]
+[\-V|\-\-version] [\-v|\-\-verbose] [\-w|\-\-waitforcert <seconds>]
+
+
+.\" depart_block_quote
+
+.SH DESCRIPTION
+This is the main puppet client. Its job is to retrieve the local
+machine\'s configuration from a remote server and apply it. In order to
+successfully communicate with the remote server, the client must have a
+certificate signed by a certificate authority that the server trusts;
+the recommended method for this, at the moment, is to run a certificate
+authority as part of the puppet server (which is the default). The
+client will connect and request a signed certificate, and will continue
+connecting until it receives one.
+
+Once the client has a signed certificate, it will retrieve its
+configuration and apply it.
+
+
+.SH USAGE NOTES
++puppetd+ does its best to find a compromise between interactive use and
+daemon use. Run with no arguments and no configuration, it will go into
+the backgroun, attempt to get a signed certificate, and retrieve and
+apply its configuration every 30 minutes.
+
+Some flags are meant specifically for interactive use \-\- in particular,
++test+ and +tags+ are useful. +test+ enables verbose logging, causes the
+daemon to stay in the foreground, exits if the server\'s configuration is
+invalid (this happens if, for instance, you\'ve left a syntax error on
+the server), and exits after running the configuration once (rather than
+hanging around as a long\-running process).
+
++tags+ allows you to specify what portions of a configuration you want
+to apply. Puppet elements are tagged with all of the class or definition
+names that contain them, and you can use the +tags+ flag to specify one
+of these names, causing only configuration elements contained within
+that class or definition to be applied. This is very useful when you are
+testing new configurations \-\- for instance, if you are just starting to
+manage +ntpd+, you would put all of the new elements into an +ntpd+
+class, and call puppet with +\-\-tags ntpd+, which would only apply that
+small portion of the configuration during your testing, rather than
+applying the whole thing.
+
+
+.SH OPTIONS
+Note that any configuration parameter that\'s valid in the configuration
+file is also a valid long argument. For example, \'server\' is a valid
+configuration parameter, so you can specify \'\-\-server <servername>\' as
+an argument.
+
+See the configuration file documentation at
+http://reductivelabs.com/projects/puppet/reference/configref.html for
+the full list of acceptable parameters. A commented list of all
+configuration options can also be generated by running puppetd with
+\'\-\-genconfig\'.
+
+daemonize: Send the process into the background. This is the default.
+
+no\-daemonize: Do not send the process into the background.
+
+debug: Enable full debugging.
+
+
+.TP
+.B disable: Disable working on the local system. This puts a lock file
+in place, causing +puppetd+ not to work on the system
+until the lock file is removed. This is useful if you are
+testing a configuration and do not want the central
+configuration to override the local state until everything
+is tested and committed.
+
++puppetd+ uses the same lock file while it is running, so no more than
+one +puppetd+ process is working at a time.
+
++puppetd+ exits after executing this.
+
+
+.TP
+.B enable: Enable working on the local system. This removes any lock
+file, causing +puppetd+ to start managing the local system
+again (although it will continue to use its normal
+scheduling, so it might not start for another half hour).
+
++puppetd+ exits after executing this.
+
+
+.TP
+.B fqdn: Set the fully\-qualified domain name of the client. This is
+only used for certificate purposes, but can be used to
+override the discovered hostname. If you need to use this
+flag, it is generally an indication of a setup problem.
+
+help: Print this help message
+
+
+.TP
+.B logdest: Where to send messages. Choose between syslog, the
+console, and a log file. Defaults to sending messages to
+syslog, or the console if debugging or verbosity is
+enabled.
+
+
+.TP
+.B no\-client: Do not create a config client. This will cause the daemon
+to run without ever checking for its configuration
+automatically, and only makes sense when used in
+conjunction with \-\-listen.
+
+
+.TP
+.B onetime: Run the configuration once, rather than as a long\-running
+daemon. This is useful for interactively running puppetd.
+
+
+.TP
+.B serve: Start another type of server. By default, +puppetd+ will
+start a service handler that allows authenticated and
+authorized remote nodes to trigger the configuration to be
+pulled down and applied. You can specify any handler here
+that does not require configuration, e.g., filebucket, ca,
+or resource. The handlers are in
++lib/puppet/network/handler+, and the names must match
+exactly, both in the call to +serve+ and in
++namespaceauth.conf+.
+
+
+.TP
+.B test: Enable the most common options used for testing. These are
++onetime+, +verbose+, +ignorecache, and
++no\-usecacheonfailure+.
+
+verbose: Turn on verbose reporting.
+
+version: Print the puppet version number and exit.
+
+
+.TP
+.B waitforcert: This option only matters for daemons that do not yet have
+certificates and it is enabled by default, with a value of
+120 (seconds). This causes +puppetd+ to connect to the
+server every 2 minutes and ask it to sign a certificate
+request. This is useful for the initial setup of a puppet
+client. You can turn off waiting for certificates by
+specifying a time of 0.
+
+
+.SH EXAMPLE
+
+.\" visit_block_quote
+puppetd \-\-server puppet.domain.com
+
+
+.\" depart_block_quote
+
+.SH AUTHOR
+Luke Kanies
+
+
+.SH COPYRIGHT
+Copyright (c) 2005, 2006 Reductive Labs, LLC Licensed under the GNU
+Public License
+
+
+.\" Generated by docutils manpage writer on 2008-03-22 17:46.
+.\"
diff --git a/man/man8/puppetdoc.8 b/man/man8/puppetdoc.8
new file mode 100644
index 000000000..d7aacee75
--- /dev/null
+++ b/man/man8/puppetdoc.8
@@ -0,0 +1,62 @@
+.TH "" "" ""
+.SH NAME
+ \-
+
+.\" Man page generated from reStructeredText.
+
+.SH SYNOPSIS
+Generate a reference for all Puppet types. Largely meant for internal
+Reductive Labs use.
+
+
+.SH USAGE
+
+.\" visit_block_quote
+puppetdoc [\-a|\-\-all] [\-h|\-\-help] [\-m|\-\-mode <text|pdf|trac> [\-r|\-\-reference <[type]|configuration|..>]
+
+
+.\" depart_block_quote
+
+.SH DESCRIPTION
+This command generates a restructured\-text document describing all
+installed Puppet types or all allowable arguments to puppet executables.
+It is largely meant for internal use and is used to generate the
+reference document available on the Reductive Labs web site.
+
+
+.SH OPTIONS
+all: Output the docs for all of the reference types.
+
+help: Print this help message
+
+
+.TP
+.B mode: Determine the output mode. Valid modes are \'text\', \'trac\',
+and \'pdf\'. Note that \'trac\' mode only works on Reductive Labs
+servers. The default mode is \'text\'.
+
+
+.TP
+.B reference: Build a particular reference. Get a list of references by
+running +puppetdoc \-\-list+.
+
+
+.SH EXAMPLE
+
+.\" visit_block_quote
+$ puppetdoc \-r type > /tmp/type_reference.rst
+
+
+.\" depart_block_quote
+
+.SH AUTHOR
+Luke Kanies
+
+
+.SH COPYRIGHT
+Copyright (c) 2005\-2007 Reductive Labs, LLC Licensed under the GNU
+Public License
+
+
+.\" Generated by docutils manpage writer on 2008-03-22 17:46.
+.\"
diff --git a/man/man8/puppetmasterd.8 b/man/man8/puppetmasterd.8
new file mode 100644
index 000000000..5a8f02751
--- /dev/null
+++ b/man/man8/puppetmasterd.8
@@ -0,0 +1,87 @@
+.TH "" "" ""
+.SH NAME
+ \-
+
+.\" Man page generated from reStructeredText.
+
+.SH SYNOPSIS
+The central puppet server. Functions as a certificate authority by
+default.
+
+
+.SH USAGE
+
+.\" visit_block_quote
+
+.TP
+.B puppetmasterd [\-D|\-\-daemonize|\-\-no\-daemonize] [\-d|\-\-debug] [\-h|\-\-help]
+[\-l|\-\-logdest <file>|console|syslog] [\-\-nobucket] [\-\-nonodes]
+[\-v|\-\-verbose] [\-V|\-\-version]
+
+
+.\" depart_block_quote
+
+.SH DESCRIPTION
+This is the puppet central daemon.
+
+
+.SH OPTIONS
+Note that any configuration parameter that\'s valid in the configuration
+file is also a valid long argument. For example, \'ssldir\' is a valid
+configuration parameter, so you can specify \'\-\-ssldir <directory>\' as an
+argument.
+
+See the configuration file documentation at
+http://reductivelabs.com/projects/puppet/reference/configref.html for
+the full list of acceptable parameters. A commented list of all
+configuration options can also be generated by running puppetmasterdd
+with \'\-\-genconfig\'.
+
+daemonize: Send the process into the background. This is the default.
+
+no\-daemonize: Do not send the process into the background.
+
+debug: Enable full debugging.
+
+help: Print this help message.
+
+
+.TP
+.B logdest: Where to send messages. Choose between syslog, the
+console, and a log file. Defaults to sending messages to
+syslog, or the console if debugging or verbosity is
+enabled.
+
+nobucket: Do not function as a file bucket.
+
+
+.TP
+.B nonodes: Do not use individual node designations; each node will
+receive the result of evaluating the entire configuration.
+
+noreports: Do not start the reports server.
+
+verbose: Enable verbosity.
+
+version: Print the puppet version number and exit.
+
+
+.SH EXAMPLE
+
+.\" visit_block_quote
+puppetmasterd
+
+
+.\" depart_block_quote
+
+.SH AUTHOR
+Luke Kanies
+
+
+.SH COPYRIGHT
+Copyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public
+License
+
+
+.\" Generated by docutils manpage writer on 2008-03-22 17:46.
+.\"
diff --git a/man/man8/puppetrun.8 b/man/man8/puppetrun.8
new file mode 100644
index 000000000..753be1ca0
--- /dev/null
+++ b/man/man8/puppetrun.8
@@ -0,0 +1,151 @@
+.TH "" "" ""
+.SH NAME
+ \-
+
+.\" Man page generated from reStructeredText.
+
+.SH SYNOPSIS
+Trigger a puppetd run on a set of hosts.
+
+
+.SH USAGE
+
+.\" visit_block_quote
+
+.TP
+.B puppetrun [\-a|\-\-all] [\-c|\-\-class <class>] [\-d|\-\-debug] [\-f|\-\-foreground]
+[\-h|\-\-help] [\-\-host <host>] [\-\-no\-fqdn] [\-\-ignoreschedules]
+[\-t|\-\-tag <tag>] [\-\-test]
+
+
+.\" depart_block_quote
+
+.SH DESCRIPTION
+This script can be used to connect to a set of machines running
++puppetd+ and trigger them to run their configurations. The most common
+usage would be to specify a class of hosts and a set of tags, and
++puppetrun+ would look up in LDAP all of the hosts matching that class,
+then connect to each host and trigger a run of all of the objects with
+the specified tags.
+
+If you are not storing your host configurations in LDAP, you can specify
+hosts manually.
+
+You will most likely have to run +puppetrun+ as root to get access to
+the SSL certificates.
+
++puppetrun+ reads +puppetmaster+\'s configuration file, so that it can
+copy things like LDAP settings.
+
+
+.SH USAGE NOTES
++puppetrun+ is useless unless +puppetd+ is listening. See its
+documentation for more information, but the gist is that you must enable
++listen+ on the +puppetd+ daemon, either using +\-\-listen+ on the command
+line or adding \'listen: true\' in its config file. In addition, you need
+to set the daemons up to specifically allow connections by creating the
++namespaceauth+ file, normally at \'/etc/puppet/namespaceauth.conf\'. This
+file specifies who has access to each namespace; if you create the file
+you must add every namespace you want any Puppet daemon to allow \-\- it
+is currently global to all Puppet daemons.
+
+An example file looks like this:
+
+
+.nf
+[fileserver]
+ allow *.madstop.com
+
+[puppetmaster]
+ allow *.madstop.com
+
+[puppetrunner]
+ allow culain.madstop.com
+.fi
+This is what you would install on your Puppet master; non\-master hosts
+could leave off the \'fileserver\' and \'puppetmaster\' namespaces.
+
+Expect more documentation on this eventually.
+
+
+.SH OPTIONS
+Note that any configuration parameter that\'s valid in the configuration
+file is also a valid long argument. For example, \'ssldir\' is a valid
+configuration parameter, so you can specify \'\-\-ssldir <directory>\' as an
+argument.
+
+See the configuration file documentation at
+http://reductivelabs.com/projects/puppet/reference/configref.html for
+the full list of acceptable parameters. A commented list of all
+configuration options can also be generated by running puppetmasterdd
+with \'\-\-genconfig\'.
+
+
+.TP
+.B all: Connect to all available hosts. Requires LDAP support
+at this point.
+
+
+.TP
+.B class: Specify a class of machines to which to connect. This
+only works if you have LDAP configured, at the moment.
+
+debug: Enable full debugging.
+
+
+.TP
+.B foreground: Run each configuration in the foreground; that is, when
+connecting to a host, do not return until the host has
+finished its run. The default is false.
+
+help: Print this help message
+
+
+.TP
+.B host: A specific host to which to connect. This flag can be
+specified more than once.
+
+
+.TP
+.B ignoreschedules: Whether the client should ignore schedules when running
+its configuration. This can be used to force the client
+to perform work it would not normally perform so soon.
+The default is false.
+
+
+.TP
+.B parallel: How parallel to make the connections. Parallelization
+is provided by forking for each client to which to
+connect. The default is 1, meaning serial execution.
+
+
+.TP
+.B tag: Specify a tag for selecting the objects to apply. Does
+not work with the \-\-test option.
+
+
+.TP
+.B test: Print the hosts you would connect to but do not
+actually connect. This option requires LDAP support at
+this point.
+
+
+.SH EXAMPLE
+
+.\" visit_block_quote
+sudo puppetrun \-p 10 \-\-host host1 \-\-host host2 \-t remotefile \-t webserver
+
+
+.\" depart_block_quote
+
+.SH AUTHOR
+Luke Kanies
+
+
+.SH COPYRIGHT
+Copyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public
+License
+
+
+.\" Generated by docutils manpage writer on 2008-03-22 17:46.
+.\"
diff --git a/man/man8/ralsh.8 b/man/man8/ralsh.8
new file mode 100644
index 000000000..fc84fe0df
--- /dev/null
+++ b/man/man8/ralsh.8
@@ -0,0 +1,148 @@
+.TH "" "" ""
+.SH NAME
+ \-
+
+.\" Man page generated from reStructeredText.
+vim: softtabstop=4 shiftwidth=4 expandtab
+
+
+.SH SYNOPSIS
+Use the Puppet RAL to directly interact with the system.
+
+
+.SH USAGE
+
+.\" visit_block_quote
+
+.TP
+.B ralsh [\-h|\-\-help] [\-d|\-\-debug] [\-v|\-\-verbose] [\-e|\-\-edit] [\-H|\-\-host <host>]
+[\-p|\-\-param <param>] [\-t|\-\-types] type <name>
+
+
+.\" depart_block_quote
+
+.SH DESCRIPTION
+This command provides simple facilities for converting current system
+state into Puppet code, along with some ability to use Puppet to affect
+the current state.
+
+By default, you must at least provide a type to list, which case ralsh
+will tell you everything it knows about all instances of that type. You
+can optionally specify an instance name, and ralsh will only describe
+that single instance.
+
+You can also add +\-\-edit+ as an argument, and ralsh will write its
+output to a file, open that file in an editor, and then apply the file
+as a Puppet transaction. You can easily use this to use Puppet to make
+simple changes to a system.
+
+
+.SH OPTIONS
+Note that any configuration parameter that\'s valid in the configuration
+file is also a valid long argument. For example, \'ssldir\' is a valid
+configuration parameter, so you can specify \'\-\-ssldir <directory>\' as an
+argument.
+
+See the configuration file documentation at
+http://reductivelabs.com/projects/puppet/reference/configref.html for
+the full list of acceptable parameters. A commented list of all
+configuration options can also be generated by running puppet with
+\'\-\-genconfig\'.
+
+debug: Enable full debugging.
+
+edit:
+
+
+.\" visit_block_quote
+Write the results of the query to a file, open the file in an editor,
+and read the file back in as an executable Puppet manifest.
+
+
+.\" depart_block_quote
+host:
+
+
+.\" visit_block_quote
+When specified, connect to the resource server on the named host
+and retrieve the list of resouces of the type specified.
+
+
+.\" depart_block_quote
+help:
+
+
+.\" visit_block_quote
+Print this help message.
+
+
+.\" depart_block_quote
+param:
+
+
+.\" visit_block_quote
+Add more parameters to be outputted from queries.
+
+
+.\" depart_block_quote
+types:
+
+
+.\" visit_block_quote
+List all available types.
+
+
+.\" depart_block_quote
+verbose: Print extra information.
+
+
+.SH EXAMPLE
+This example uses
+.\" visit_literal
+ralsh
+.\" depart_literal
+ to return Puppet configuration for the user
+
+.\" visit_literal
+luke
+.\" depart_literal
+:
+
+
+.nf
+$ ralsh user luke
+.fi
+
+.\" visit_block_quote
+
+.TP
+.B user { \'luke\':
+home => \'/home/luke\',
+uid => \'100\',
+ensure => \'present\',
+comment => \'Luke Kanies,,,\',
+gid => \'1000\',
+shell => \'/bin/bash\',
+groups => [\'sysadmin\',\'audio\',\'video\',\'puppet\']
+
+\.SH system-message
+System Message: WARNING/2 (./ralsh.rst:, line 87)
+Definition list ends without a blank line; unexpected unindent.
+
+
+}
+
+
+.\" depart_block_quote
+
+.SH AUTHOR
+Luke Kanies
+
+
+.SH COPYRIGHT
+Copyright (c) 2005\-2007 Reductive Labs, LLC Licensed under the GNU
+Public License
+
+
+.\" Generated by docutils manpage writer on 2008-03-22 17:46.
+.\"
diff --git a/spec/unit/indirector/catalog/compiler.rb b/spec/unit/indirector/catalog/compiler.rb
index 77638a410..a4a0acd58 100755
--- a/spec/unit/indirector/catalog/compiler.rb
+++ b/spec/unit/indirector/catalog/compiler.rb
@@ -171,7 +171,7 @@ describe Puppet::Node::Catalog::Compiler, " when determining a client's availabl
end
it "should use the client's Facts version as the available catalog version if it is the most recent" do
- Puppet::Node::Facts.expects(:version).with(@name).returns(5)
+ Puppet::Node::Facts.stubs(:version).with(@name).returns(5)
Puppet::Node.expects(:version).with(@name).returns(3)
@catalog.interpreter.stubs(:catalog_version).returns(4)
@@ -179,7 +179,7 @@ describe Puppet::Node::Catalog::Compiler, " when determining a client's availabl
end
it "should use the client's Node version as the available catalog version if it is the most recent" do
- Puppet::Node::Facts.expects(:version).with(@name).returns(3)
+ Puppet::Node::Facts.stubs(:version).with(@name).returns(3)
Puppet::Node.expects(:version).with(@name).returns(5)
@catalog.interpreter.stubs(:catalog_version).returns(4)
@@ -187,7 +187,7 @@ describe Puppet::Node::Catalog::Compiler, " when determining a client's availabl
end
it "should use the last parse date as the available catalog version if it is the most recent" do
- Puppet::Node::Facts.expects(:version).with(@name).returns(3)
+ Puppet::Node::Facts.stubs(:version).with(@name).returns(3)
Puppet::Node.expects(:version).with(@name).returns(4)
@catalog.interpreter.stubs(:catalog_version).returns(5)
diff --git a/spec/unit/indirector/node/plain.rb b/spec/unit/indirector/node/plain.rb
index 105d0ed63..943af52b4 100755
--- a/spec/unit/indirector/node/plain.rb
+++ b/spec/unit/indirector/node/plain.rb
@@ -15,4 +15,10 @@ describe Puppet::Node::Plain do
node.expects(:fact_merge)
@searcher.find("mynode")
end
+
+ it "should use the version of the facts as its version" do
+ version = mock 'version'
+ Puppet::Node::Facts.expects(:version).with("me").returns version
+ @searcher.version("me").should equal(version)
+ end
end
diff --git a/spec/unit/indirector/yaml.rb b/spec/unit/indirector/yaml.rb
index b61332485..339529ab0 100755
--- a/spec/unit/indirector/yaml.rb
+++ b/spec/unit/indirector/yaml.rb
@@ -20,7 +20,6 @@ describe Puppet::Indirector::Yaml, " when choosing file location" do
@subject.name = :me
@dir = "/what/ever"
- Puppet.settings.stubs(:use)
Puppet.settings.stubs(:value).with(:yamldir).returns(@dir)
end
diff --git a/spec/unit/network/client.rb b/spec/unit/network/client.rb
new file mode 100644
index 000000000..bc41efb4f
--- /dev/null
+++ b/spec/unit/network/client.rb
@@ -0,0 +1,43 @@
+#!/usr/bin/env ruby
+#
+# Created by Luke Kanies on 2008-3-24.
+# Copyright (c) 2008. All rights reserved.
+
+require File.dirname(__FILE__) + '/../../spec_helper'
+
+require 'puppet/network/client'
+
+describe Puppet::Network::Client do
+ before do
+ Puppet::Network::HttpPool.stubs(:cert_setup)
+ end
+ describe "when keep-alive is enabled" do
+ before do
+ Puppet::Network::HttpPool.stubs(:keep_alive?).returns true
+ end
+ it "should start the http client up on creation" do
+ http = mock 'http'
+ http.stub_everything
+ http.expects(:start)
+ Net::HTTP.stubs(:new).returns http
+
+ # Pick a random subclass...
+ Puppet::Network::Client.master.new :Server => Puppet[:server]
+ end
+ end
+
+ describe "when keep-alive is disabled" do
+ before do
+ Puppet::Network::HttpPool.stubs(:keep_alive?).returns false
+ end
+ it "should not start the http client up on creation" do
+ http = mock 'http'
+ http.stub_everything
+ http.expects(:start).never
+ Net::HTTP.stubs(:new).returns http
+
+ # Pick a random subclass...
+ Puppet::Network::Client.master.new :Server => Puppet[:server]
+ end
+ end
+end
diff --git a/spec/unit/network/http_pool.rb b/spec/unit/network/http_pool.rb
index 3043c5e61..1fbc17471 100755
--- a/spec/unit/network/http_pool.rb
+++ b/spec/unit/network/http_pool.rb
@@ -14,6 +14,10 @@ describe Puppet::Network::HttpPool, " when adding certificate information to htt
[:add_file,:purpose=].each { |m| @store.stubs(m) }
end
+ it "should have keep-alive disabled" do
+ Puppet::Network::HttpPool::HTTP_KEEP_ALIVE.should be_false
+ end
+
it "should do nothing if no certificate is available" do
Puppet::Network::HttpPool.expects(:read_cert).returns(false)
@http.expects(:cert=).never
@@ -102,117 +106,135 @@ describe Puppet::Network::HttpPool, " when adding certificate information to htt
after do
Puppet::Network::HttpPool.clear_http_instances
end
-end
-describe Puppet::Network::HttpPool, " when managing http instances" do
- def stub_settings(settings)
- settings.each do |param, value|
- Puppet.settings.stubs(:value).with(param).returns(value)
+ describe "when managing http instances" do
+ def stub_settings(settings)
+ settings.each do |param, value|
+ Puppet.settings.stubs(:value).with(param).returns(value)
+ end
end
- end
-
- before do
- # All of hte cert stuff is tested elsewhere
- Puppet::Network::HttpPool.stubs(:cert_setup)
- end
-
- it "should return an http instance created with the passed host and port" do
- http = stub 'http', :use_ssl= => nil, :read_timeout= => nil, :open_timeout= => nil, :enable_post_connection_check= => nil, :started? => false
- Net::HTTP.expects(:new).with("me", 54321, nil, nil).returns(http)
- Puppet::Network::HttpPool.http_instance("me", 54321).should equal(http)
- end
-
- it "should enable ssl on the http instance" do
- Puppet::Network::HttpPool.http_instance("me", 54321).instance_variable_get("@use_ssl").should be_true
- end
- it "should set the read timeout" do
- Puppet::Network::HttpPool.http_instance("me", 54321).read_timeout.should == 120
- end
+ before do
+ # All of hte cert stuff is tested elsewhere
+ Puppet::Network::HttpPool.stubs(:cert_setup)
+ end
- it "should set the open timeout" do
- Puppet::Network::HttpPool.http_instance("me", 54321).open_timeout.should == 120
- end
+ it "should return an http instance created with the passed host and port" do
+ http = stub 'http', :use_ssl= => nil, :read_timeout= => nil, :open_timeout= => nil, :enable_post_connection_check= => nil, :started? => false
+ Net::HTTP.expects(:new).with("me", 54321, nil, nil).returns(http)
+ Puppet::Network::HttpPool.http_instance("me", 54321).should equal(http)
+ end
- it "should default to http_enable_post_connection_check being enabled" do
- Puppet.settings[:http_enable_post_connection_check].should be_true
- end
+ it "should enable ssl on the http instance" do
+ Puppet::Network::HttpPool.http_instance("me", 54321).instance_variable_get("@use_ssl").should be_true
+ end
- # JJM: I'm not sure if this is correct, as this really follows the
- # configuration option.
- it "should set enable_post_connection_check true " do
- Puppet::Network::HttpPool.http_instance("me", 54321).instance_variable_get("@enable_post_connection_check").should be_true
- end
+ it "should set the read timeout" do
+ Puppet::Network::HttpPool.http_instance("me", 54321).read_timeout.should == 120
+ end
- it "should create the http instance with the proxy host and port set if the http_proxy is not set to 'none'" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
- Puppet::Network::HttpPool.http_instance("me", 54321).open_timeout.should == 120
- end
+ it "should set the open timeout" do
+ Puppet::Network::HttpPool.http_instance("me", 54321).open_timeout.should == 120
+ end
- it "should cache http instances" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
- old = Puppet::Network::HttpPool.http_instance("me", 54321)
- Puppet::Network::HttpPool.http_instance("me", 54321).should equal(old)
- end
+ it "should default to http_enable_post_connection_check being enabled" do
+ Puppet.settings[:http_enable_post_connection_check].should be_true
+ end
- it "should have a mechanism for getting a new http instance instead of the cached instance" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
- old = Puppet::Network::HttpPool.http_instance("me", 54321)
- Puppet::Network::HttpPool.http_instance("me", 54321, true).should_not equal(old)
- end
+ # JJM: I'm not sure if this is correct, as this really follows the
+ # configuration option.
+ it "should set enable_post_connection_check true " do
+ Puppet::Network::HttpPool.http_instance("me", 54321).instance_variable_get("@enable_post_connection_check").should be_true
+ end
- it "should close existing, open connections when requesting a new connection" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
- old = Puppet::Network::HttpPool.http_instance("me", 54321)
- old.expects(:started?).returns(true)
- old.expects(:finish)
- Puppet::Network::HttpPool.http_instance("me", 54321, true)
- end
+ it "should create the http instance with the proxy host and port set if the http_proxy is not set to 'none'" do
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
+ Puppet::Network::HttpPool.http_instance("me", 54321).open_timeout.should == 120
+ end
- it "should have a mechanism for clearing the http cache" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
- old = Puppet::Network::HttpPool.http_instance("me", 54321)
- Puppet::Network::HttpPool.http_instance("me", 54321).should equal(old)
- old = Puppet::Network::HttpPool.http_instance("me", 54321)
- Puppet::Network::HttpPool.clear_http_instances
- Puppet::Network::HttpPool.http_instance("me", 54321).should_not equal(old)
- end
+ describe "when http keep-alive is enabled" do
+ before do
+ Puppet::Network::HttpPool.stubs(:keep_alive?).returns true
+ end
+
+ it "should cache http instances" do
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
+ old = Puppet::Network::HttpPool.http_instance("me", 54321)
+ Puppet::Network::HttpPool.http_instance("me", 54321).should equal(old)
+ end
+
+ it "should have a mechanism for getting a new http instance instead of the cached instance" do
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
+ old = Puppet::Network::HttpPool.http_instance("me", 54321)
+ Puppet::Network::HttpPool.http_instance("me", 54321, true).should_not equal(old)
+ end
+
+ it "should close existing, open connections when requesting a new connection" do
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
+ old = Puppet::Network::HttpPool.http_instance("me", 54321)
+ old.expects(:started?).returns(true)
+ old.expects(:finish)
+ Puppet::Network::HttpPool.http_instance("me", 54321, true)
+ end
+
+ it "should have a mechanism for clearing the http cache" do
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
+ old = Puppet::Network::HttpPool.http_instance("me", 54321)
+ Puppet::Network::HttpPool.http_instance("me", 54321).should equal(old)
+ old = Puppet::Network::HttpPool.http_instance("me", 54321)
+ Puppet::Network::HttpPool.clear_http_instances
+ Puppet::Network::HttpPool.http_instance("me", 54321).should_not equal(old)
+ end
+
+ it "should close open http connections when clearing the cache" do
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
+ one = Puppet::Network::HttpPool.http_instance("me", 54321)
+ one.expects(:started?).returns(true)
+ one.expects(:finish).returns(true)
+ Puppet::Network::HttpPool.clear_http_instances
+ end
+
+ it "should not close unopened http connections when clearing the cache" do
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
+ one = Puppet::Network::HttpPool.http_instance("me", 54321)
+ one.expects(:started?).returns(false)
+ one.expects(:finish).never
+ Puppet::Network::HttpPool.clear_http_instances
+ end
+ end
- it "should close open http connections when clearing the cache" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
- one = Puppet::Network::HttpPool.http_instance("me", 54321)
- one.expects(:started?).returns(true)
- one.expects(:finish).returns(true)
- Puppet::Network::HttpPool.clear_http_instances
- end
+ describe "when http keep-alive is disabled" do
+ before do
+ Puppet::Network::HttpPool.stubs(:keep_alive?).returns false
+ end
- it "should not close unopened http connections when clearing the cache" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
- one = Puppet::Network::HttpPool.http_instance("me", 54321)
- one.expects(:started?).returns(false)
- one.expects(:finish).never
- Puppet::Network::HttpPool.clear_http_instances
- end
+ it "should not cache http instances" do
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :http_enable_post_connection_check => true
+ old = Puppet::Network::HttpPool.http_instance("me", 54321)
+ Puppet::Network::HttpPool.http_instance("me", 54321).should_not equal(old)
+ end
+ end
- # We mostly have to do this for testing, since in real life people
- # won't change certs within a single process.
- it "should remove its loaded certificate when clearing the cache" do
- Puppet::Network::HttpPool.instance_variable_set("@cert", :yay)
- Puppet::Network::HttpPool.clear_http_instances
- # Can't use the accessor, because it will read the cert in
- Puppet::Network::HttpPool.instance_variable_get("@cert").should be_nil
- end
+ # We mostly have to do this for testing, since in real life people
+ # won't change certs within a single process.
+ it "should remove its loaded certificate when clearing the cache" do
+ Puppet::Network::HttpPool.instance_variable_set("@cert", :yay)
+ Puppet::Network::HttpPool.clear_http_instances
+ # Can't use the accessor, because it will read the cert in
+ Puppet::Network::HttpPool.instance_variable_get("@cert").should be_nil
+ end
- # We mostly have to do this for testing, since in real life people
- # won't change certs within a single process.
- it "should remove its loaded key when clearing the cache" do
- Puppet::Network::HttpPool.instance_variable_set("@key", :yay)
- Puppet::Network::HttpPool.clear_http_instances
- # Can't use the accessor, because it will read the cert in
- Puppet::Network::HttpPool.instance_variable_get("@key").should be_nil
- end
+ # We mostly have to do this for testing, since in real life people
+ # won't change certs within a single process.
+ it "should remove its loaded key when clearing the cache" do
+ Puppet::Network::HttpPool.instance_variable_set("@key", :yay)
+ Puppet::Network::HttpPool.clear_http_instances
+ # Can't use the accessor, because it will read the cert in
+ Puppet::Network::HttpPool.instance_variable_get("@key").should be_nil
+ end
- after do
- Puppet::Network::HttpPool.clear_http_instances
+ after do
+ Puppet::Network::HttpPool.clear_http_instances
+ end
end
end
diff --git a/spec/unit/node.rb b/spec/unit/node.rb
index b16696585..bb99378d9 100755
--- a/spec/unit/node.rb
+++ b/spec/unit/node.rb
@@ -143,8 +143,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
diff --git a/test/language/parser.rb b/test/language/parser.rb
index 2a0e9c02d..2161a33f5 100755
--- a/test/language/parser.rb
+++ b/test/language/parser.rb
@@ -1141,6 +1141,7 @@ file { "/tmp/yayness":
name = "sub"
mk_module(modname, :init => %w{separate}, :sub => %w{separate::sub})
+ Puppet.err :yay
# First try it with a namespace
klass = parser.findclass("separate", name)
assert_instance_of(AST::HostClass, klass, "Did not autoload sub class from separate file with a namespace")
diff --git a/test/network/client/client.rb b/test/network/client/client.rb
index b6b915d31..5f96cac11 100755
--- a/test/network/client/client.rb
+++ b/test/network/client/client.rb
@@ -140,35 +140,6 @@ class TestClient < Test::Unit::TestCase
}
end
- def test_classfile
- Puppet[:code] = "class yaytest {}\n class bootest {}\n include yaytest, bootest"
-
- Puppet::Node::Facts.indirection.stubs(:save)
-
- master = client = nil
- assert_nothing_raised() {
- master = Puppet::Network::Handler.master.new(
- :Local => false
- )
- }
- assert_nothing_raised() {
- client = Puppet::Network::Client.master.new(
- :Master => master
- )
- }
-
- # Fake that it's local, so it creates the class file
- client.local = false
-
- # We can't guarantee class ordering
- client.expects(:setclasses).with do |array|
- array.length == 2 and array.include?("yaytest") and array.include?("bootest")
- end
- assert_nothing_raised {
- client.getconfig
- }
- end
-
def test_client_loading
# Make sure we don't get a failure but that we also get nothing back
assert_nothing_raised do
diff --git a/test/network/client/master.rb b/test/network/client/master.rb
index 28e7b8968..14c7dd852 100755
--- a/test/network/client/master.rb
+++ b/test/network/client/master.rb
@@ -576,4 +576,33 @@ end
# Doesn't throw an exception, but definitely fails.
client.run
end
+
+ def test_classfile
+ Puppet[:code] = "class yaytest {}\n class bootest {}\n include yaytest, bootest"
+
+ Puppet::Node::Facts.indirection.stubs(:save)
+
+ master = client = nil
+ assert_nothing_raised() {
+ master = Puppet::Network::Handler.master.new(
+ :Local => false
+ )
+ }
+ assert_nothing_raised() {
+ client = Puppet::Network::Client.master.new(
+ :Master => master
+ )
+ }
+
+ # Fake that it's local, so it creates the class file
+ client.local = false
+
+ # We can't guarantee class ordering
+ client.expects(:setclasses).with do |array|
+ array.length == 2 and array.include?("yaytest") and array.include?("bootest")
+ end
+ assert_nothing_raised {
+ client.getconfig
+ }
+ end
end
diff --git a/test/network/handler/master.rb b/test/network/handler/master.rb
index 88bfe6b7e..55522237b 100755
--- a/test/network/handler/master.rb
+++ b/test/network/handler/master.rb
@@ -90,11 +90,15 @@ class TestMaster < Test::Unit::TestCase
resname, resip = master.send(:clientname, nil, nil, facts)
assert_equal(facts["hostname"], resname, "Did not use fact hostname when no certname was present")
assert_equal(facts["ipaddress"], resip, "Did not use fact ip when no certname was present")
+ assert_equal(facts["domain"], "fact_domain", "Did not use fact domain when no certname was present")
+ assert_equal(facts["fqdn"], "fact_hostname.fact_domain", "Did not use fact fqdn when no certname was present")
# Now try it with the cert stuff present
resname, resip = master.send(:clientname, certname, certip, facts)
assert_equal(certname, resname, "Did not use cert hostname when certname was present")
assert_equal(certip, resip, "Did not use cert ip when certname was present")
+ assert_equal(facts["domain"], certdomain, "Did not use cert domain when certname was present")
+ assert_equal(facts["fqdn"], certname, "Did not use cert fqdn when certname was present")
# And reset the node_name stuff and make sure we use it.
Puppet[:node_name] = :facter
diff --git a/test/ral/manager/provider.rb b/test/ral/manager/provider.rb
index bb7a21485..89aa49b9e 100755
--- a/test/ral/manager/provider.rb
+++ b/test/ral/manager/provider.rb
@@ -73,11 +73,6 @@ class TestTypeProviders < Test::Unit::TestCase
confine :exists => "/no/such/file"
end
- inst = provider.new(:name => "bar")
- assert_raise(Puppet::Error, "Did not fail on unsuitable provider instance") do
- resource = @type.create :name => "bar", :provider => inst
- end
-
# And make sure the provider must be a valid provider type for this resource
pkgprov = Puppet::Type.type(:package).create(:name => "yayness").provider
assert(provider, "did not get package provider")
@@ -87,5 +82,26 @@ class TestTypeProviders < Test::Unit::TestCase
end
end
+
+ # #571 -- so we can cause a provider to become suitable within
+ # a run.
+ def test_unsuitable_providers_should_not_fail_at_initialization
+ Puppet::Type.type(:user).provider(:useradd).stubs(:suitable?).returns false
+
+ assert_nothing_raised("Unsuitable providers failed at initialization") do
+ Puppet::Type.type(:user).create :name => "luke", :ensure => :present, :provider => :useradd
+ end
+ end
+
+ # #571 -- so we can cause a provider to become suitable within
+ # a run.
+ def test_unsuitable_providers_should_fail_at_evaluation
+ Puppet::Type.type(:user).provider(:useradd).stubs(:suitable?).returns false
+
+ user = Puppet::Type.type(:user).create :name => "luke", :ensure => :present, :provider => :useradd
+ assert_raise(Puppet::Error, "Unsuitable provider did not fail at evaluation") do
+ user.evaluate
+ end
+ end
end
diff --git a/test/ral/providers/mailalias/aliases.rb b/test/ral/providers/mailalias/aliases.rb
index 663d4359c..ec8b84684 100755
--- a/test/ral/providers/mailalias/aliases.rb
+++ b/test/ral/providers/mailalias/aliases.rb
@@ -4,7 +4,6 @@ require File.dirname(__FILE__) + '/../../../lib/puppettest'
require 'puppettest'
require 'puppettest/fileparsing'
-require 'puppet/type/mailalias'
class TestMailaliasAliasesProvider < Test::Unit::TestCase
include PuppetTest
diff --git a/test/ral/type/tidy.rb b/test/ral/type/tidy.rb
index 17f98df22..657ca6e93 100755
--- a/test/ral/type/tidy.rb
+++ b/test/ral/type/tidy.rb
@@ -4,7 +4,6 @@ require File.dirname(__FILE__) + '/../../lib/puppettest'
require 'puppettest'
require 'puppettest/support/utils'
-require 'puppet/type/tidy'
class TestTidy < Test::Unit::TestCase
include PuppetTest::Support::Utils
@@ -76,7 +75,7 @@ class TestTidy < Test::Unit::TestCase
# Test the different age iterations.
def test_age_conversions
- tidy = Puppet::Type.newtidy :path => tempfile(), :age => "1m"
+ tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :age => "1m"
convertors = {
:second => 1,
@@ -119,7 +118,7 @@ class TestTidy < Test::Unit::TestCase
:gb => 3
}
- tidy = Puppet::Type.newtidy :path => tempfile(), :age => "1m"
+ tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :age => "1m"
# First make sure we default to kb
assert_nothing_raised do
@@ -149,7 +148,7 @@ class TestTidy < Test::Unit::TestCase
end
def test_agetest
- tidy = Puppet::Type.newtidy :path => tempfile(), :age => "1m"
+ tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :age => "1m"
age = tidy.property(:age)
@@ -161,7 +160,7 @@ class TestTidy < Test::Unit::TestCase
end
def test_sizetest
- tidy = Puppet::Type.newtidy :path => tempfile(), :size => "1k"
+ tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :size => "1k"
size = tidy.property(:size)
@@ -175,7 +174,7 @@ class TestTidy < Test::Unit::TestCase
# Make sure we can remove different types of files
def test_tidytypes
path = tempfile()
- tidy = Puppet::Type.newtidy :path => path, :size => "1b", :age => "1s"
+ tidy = Puppet::Type.type(:tidy).create :path => path, :size => "1b", :age => "1s"
# Start with a file
File.open(path, "w") { |f| f.puts "this is a test" }
@@ -232,7 +231,7 @@ class TestTidy < Test::Unit::TestCase
Dir.mkdir(dir)
File.symlink(target, link)
- tidy = Puppet::Type.newtidy :path => dir, :size => "1b", :recurse => true
+ tidy = Puppet::Type.type(:tidy).create :path => dir, :size => "1b", :recurse => true
assert_apply(tidy)
assert(! FileTest.symlink?(link), "link was not tidied")
end