Issue #4339 has been updated by Jacob Helwig.
Looking at the 2.6.next branch:
Given the tests in `spec/unit/configurer_spec.rb`:
it "should save the last run summary if reporting is enabled" do
Puppet.settings[:report] = true
@configurer.expects(:save_last_run_summary).with(@report)
@configurer.send_report(@report, nil)
end
it "should not save the last run summary if reporting is disabled" do
Puppet.settings[:report] = false
@configurer.expects(:save_last_run_summary).never
@configurer.send_report(@report, nil)
end
Then it looks like the implementation in `lib/puppet/configurer.rb`
should actually be:
def send_report(report, trans)
report.finalize_report if trans
puts report.summary if Puppet[:summarize]
if Puppet[:report]
save_last_run_summary(report)
report.save
end
rescue => detail
puts detail.backtrace if Puppet[:trace]
Puppet.err "Could not send report: #{detail}"
end
Given that the tests pass with the old implementation (calling
save_last_run_summary before the if), I'm suspicious of the tests
(doubly so since they still pass after changing the implementation to
what I show above). I'm going to spend some time mucking about in the
tests to make sure I haven't gone craz(y|ier).
Quick sanity check: Is the desired behaviour to actually only save the
last run summary if reporting is turned on?
----------------------------------------
Feature #4339: Record last run status on the node
https://projects.puppetlabs.com/issues/4339
Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: Jacob Helwig
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.