Issue #8195 has been reported by R.I. Pienaar.

----------------------------------------
Bug #8195: postrun_command should run after reports and summaries
https://projects.puppetlabs.com/issues/8195

Author: R.I. Pienaar
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 2.6.8
Keywords: 
Branch: 


At present the postrun_command is being run before the reports are sent and 
therefore also before they are stored locally in lastrunfile and lastrunreport.

This also has the very undesirable effect that a failure in the post run 
command will prevent reports from being sent:

<pre>
% puppet --report test.pp
% ls -l /home/rip/.puppet/var/state/last*
-rw-rw---- 1 rip rip 7374 Jul  1 18:05 
/home/rip/.puppet/var/state/last_run_report.yaml
-rw-rw---- 1 rip rip  283 Jul  1 18:05 
/home/rip/.puppet/var/state/last_run_summary.yaml
<pre>

Now we cause the post script to fail, reports not being written:

<pre>
% date
Fri Jul  1 18:07:03 BST 2011
% puppet --report --postrun_command=/bin/false test.pp
Could not run command from postrun_command: Execution of '/bin/false' returned 
1: 
% ls -l /home/rip/.puppet/var/state/last*
-rw-rw---- 1 rip rip 7374 Jul  1 18:05 
/home/rip/.puppet/var/state/last_run_report.yaml
-rw-rw---- 1 rip rip  283 Jul  1 18:05 
/home/rip/.puppet/var/state/last_run_summary.yaml
</pre>

It seems that a common case would be to process these files after runs and this 
command preventing reports being sent/written is a bad thing.  Would be good if 
the code can Puppet::Configurer#run could be tweaked.

https://github.com/puppetlabs/puppet/blob/2.7.1/lib/puppet/configurer.rb#L158-170


-- 
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.

Reply via email to