summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-09-07 10:58:07 -0500
committerLuke Kanies <luke@madstop.com>2007-09-07 10:58:07 -0500
commitca57c793d4f1ad249f63f26609be2fa9208ca244 (patch)
tree61fdc868bb4637c3661f79fa6fdf74443ed6da86 /lib
parentcaad11a9d15210017f75918b50184bc12f2cc1d0 (diff)
downloadpuppet-ca57c793d4f1ad249f63f26609be2fa9208ca244.tar.gz
puppet-ca57c793d4f1ad249f63f26609be2fa9208ca244.tar.xz
puppet-ca57c793d4f1ad249f63f26609be2fa9208ca244.zip
Fixing #801 -- resources that have changes when running in noop mode do not record that they were checked, so that they will be scheduled on the next run. This is a somewhat murky solution, but considering that no one had submitted this bug before, I expect it will not hit many people.
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/metatype/evaluation.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/puppet/metatype/evaluation.rb b/lib/puppet/metatype/evaluation.rb
index 4b8d293c4..b358fefad 100644
--- a/lib/puppet/metatype/evaluation.rb
+++ b/lib/puppet/metatype/evaluation.rb
@@ -29,7 +29,16 @@ class Puppet::Type
self.debug "%s change(s)" %
[changes.length]
end
- self.cache(:checked, Time.now)
+
+ # If we're in noop mode, we don't want to store the checked time,
+ # because it will result in the resource not getting scheduled if
+ # someone were to run the configuration in non-noop mode.
+ # We're going to go ahead and record that we checked if there were
+ # no changes, since it's unlikely it will affect the scheduling.
+ noop = noop?
+ if ! noop or (noop && changes.length == 0)
+ self.cache(:checked, Time.now)
+ end
return changes.flatten
end