Issue #4339 has been updated by Jacob Helwig.
Status changed from Accepted to Available In Testing Branch
Assignee deleted (Jacob Helwig)
Nick Lewis and I have squashed the following diff into Brice's patch
for the summary file. The entire branch has been merged into 2.6.next
in commit:356cb8bbd05421346839520f978d4a8ba1b59338
diff --git a/lib/puppet/configurer.rb b/lib/puppet/configurer.rb
index de1c93b..9f68ca4 100644
--- a/lib/puppet/configurer.rb
+++ b/lib/puppet/configurer.rb
@@ -173,9 +173,7 @@ class Puppet::Configurer
report.finalize_report if trans
puts report.summary if Puppet[:summarize]
save_last_run_summary(report)
- if Puppet[:report]
- report.save
- end
+ report.save if Puppet[:report]
rescue => detail
puts detail.backtrace if Puppet[:trace]
Puppet.err "Could not send report: #{detail}"
diff --git a/spec/unit/configurer_spec.rb b/spec/unit/configurer_spec.rb
index d690957..a4b627c 100755
--- a/spec/unit/configurer_spec.rb
+++ b/spec/unit/configurer_spec.rb
@@ -226,10 +226,12 @@ describe Puppet::Configurer, "when executing a
catalog run" do
end
describe Puppet::Configurer, "when sending a report" do
+ include PuppetSpec::Files
+
before do
Puppet.settings.stubs(:use).returns(true)
@configurer = Puppet::Configurer.new
- @configurer.stubs(:save_last_run_summary)
+ Puppet[:lastrunfile] = tmpfile('last_run_file')
@report = Puppet::Transaction::Report.new("apply")
@trans = stub 'transaction'
@@ -277,10 +279,10 @@ describe Puppet::Configurer, "when sending a report"
do
@configurer.send_report(@report, nil)
end
- it "should not save the last run summary if reporting is disabled" do
+ it "should save the last run summary if reporting is disabled" do
Puppet.settings[:report] = false
- @configurer.expects(:save_last_run_summary).never
+ @configurer.expects(:save_last_run_summary).with(@report)
@configurer.send_report(@report, nil)
end
----------------------------------------
Feature #4339: Record last run status on the node
https://projects.puppetlabs.com/issues/4339
Author: R.I. Pienaar
Status: Available In Testing Branch
Priority: Normal
Assignee:
Category: reports
Target version: 2.6.x
Affected Puppet version: 2.6.0
Keywords: communitypatch
mcollective
Branch: https://github.com/masterzen/puppet/tree/feature/master/4339
It would be helpful for monitoring if the status of the last run from either a
daemonized puppetd or one from --test etc could be recorded in $vardir
somewhere.
The whole report would be too big to parse regularly from nagios so maybe a
smaller structured yaml file with the information that --summarize would show.
This way we could easily monitor the detailed status of our node runs in a way
that isnt very resource intensive or requiring extra tools like dashboards -
just generally tighter integration with our existing toolset.
Additionally it would be helpful if the reports could be written on the nodes
as well as to the network.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" 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-bugs?hl=en.