Issue #20679 has been updated by Andrew Parker.

Assignee changed from Andrew Parker to eric sorenson

Assuming we want to keep noop on a per-resource basis, I think that we should 
change Puppet::Transaction (handling of noop is done in 
Puppet::Transaction::ResourceHarness) to pay attention to `Puppet[:noop]` (via 
a passed in parameter) and remove the logic from `Puppet::Property`. That way 
we have control of a "global" noop when applying a catalog. Then we modify the 
pluginsync to perform the transaction with `noop = false` and the host catalog 
is applied with `noop = Puppet[:noop]`.

I estimate to untangle the code, create tests, deal with any test debt in that 
area, and make the change will take between 1 and 2 weeks of elapsed time.

The problem that I have with Josh's proposed patch is that it still gives the 
individual resources power to escape noop since a custom type can change how 
parameters/properties behave and doesn't lead us to a more uncouple design.

----------------------------------------
Bug #20679: puppet agent --noop command line option does not guarantee a fully 
dry run
https://projects.puppetlabs.com/issues/20679#change-92203

* Author: Nick Moriarty
* Status: Needs Decision
* Priority: High
* Assignee: eric sorenson
* Category: agent
* Target version: 
* Affected Puppet version: 2.7.11
* Keywords: noop simulation dry-run dryrun simulate test backlog
* Branch: 
----------------------------------------
According to some documentation (including man pages), and common sense, 
specifying --noop should cause Puppet agent to run in 'dry-run' mode, and make 
no changes.

However, it seems that this actually just changes the global resource default 
for 'noop' to true.  If a resource is defined which determines noop itself (for 
example, based on a parameter), this will escape what would reasonably be 
expected to be a simulation run, as it will override the global noop with 
'false'.

I noticed this while testing a development branch and noting that it actually 
affected a file mode somewhere.

If not implemented via the 'noop' mechanism, a proper simulation mode should be 
provided which will show exactly what will happen, but with the guarantee that 
nothing will be done.  The current --noop flag certainly doesn't provide that 
guarantee.

This issue may cause us to internally ban the use of 'noop' in manifests, as it 
leaves us with no way of guaranteeing a proper dry run.


-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to