| This is still reproducible. The problem is the configurer always tries to send the report and update its locally cached files, regardless of noop mode. It shouldn't do that. We had a similar bug where the cached catalog was being updated in noop mode.
$ puppet apply --noop t.pp --lastrunreport /dev/null |
Notice: Compiled catalog for localhost in environment production in 0.01 seconds |
Notice: Applied catalog in 0.02 seconds |
Error: Could not send report: Permission denied @ dir_s_mkdir - /dev/null20200507-26509-53y7c8.lock
|
Puppet should not update its Puppet[:lastrunreport] or Puppet[:lastrunfile] when running in noop. I think this is a one line change:
diff --git a/lib/puppet/configurer.rb b/lib/puppet/configurer.rb |
index 6da432f15a..fe6fb79185 100644 |
--- a/lib/puppet/configurer.rb |
+++ b/lib/puppet/configurer.rb |
@@ -431,6 +431,7 @@ class Puppet::Configurer |
private :find_functional_server |
|
def send_report(report) |
+ return if Puppet[:noop] |
puts report.summary if Puppet[:summarize] |
save_last_run_summary(report) |
Puppet::Transaction::Report.indirection.save(report, nil, :environment => Puppet::Node::Environment.remote(@environment)) if Puppet[:report]
|
|