Added :metrics to the settings used by the master
Signed-off-by: James Turnbull <[email protected]>
---
lib/puppet/application/master.rb | 2 +-
lib/puppet/defaults.rb | 1 +
spec/unit/application/master_spec.rb | 4 ++--
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/puppet/application/master.rb b/lib/puppet/application/master.rb
index fde4749..c643a74 100644
--- a/lib/puppet/application/master.rb
+++ b/lib/puppet/application/master.rb
@@ -136,7 +136,7 @@ class Puppet::Application::Master < Puppet::Application
exit(Puppet.settings.print_configs ? 0 : 1) if
Puppet.settings.print_configs?
- Puppet.settings.use :main, :master, :ssl
+ Puppet.settings.use :main, :master, :ssl, :metrics
# Cache our nodes in yaml. Currently not configurable.
Puppet::Node.cache_class = :yaml
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 687ac4e..1bb627e 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -464,6 +464,7 @@ module Puppet
setdefaults(:metrics,
:rrddir => {:default => "$vardir/rrd",
+ :mode => 0750,
:owner => "service",
:group => "service",
:desc => "The directory where RRD database files are stored.
diff --git a/spec/unit/application/master_spec.rb
b/spec/unit/application/master_spec.rb
index 074249a..d99b22d 100644
--- a/spec/unit/application/master_spec.rb
+++ b/spec/unit/application/master_spec.rb
@@ -176,8 +176,8 @@ describe Puppet::Application::Master do
lambda { @master.setup }.should raise_error(SystemExit)
end
- it "should tell Puppet.settings to use :main,:ssl and :master category" do
- Puppet.settings.expects(:use).with(:main,:master,:ssl)
+ it "should tell Puppet.settings to use :main,:ssl,:master and :metrics
category" do
+ Puppet.settings.expects(:use).with(:main,:master,:ssl,:metrics)
@master.setup
end
--
1.7.1
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.