Issue #10388 has been updated by Josh Cooper.
Status changed from Unreviewed to Investigating
Affected Puppet version changed from 2.7.6 to 2.6.5
This was first broken in 2.6.5 in commit
7fff7808e25491a5ea1e207b8de3ade0c4f95f4f for issue #5408
I'm using a slightly different manifest, that doesn't require root:
<pre>
file { '/Users/josh/tmp/test':
audit => 'checksum',
owner => 'josh',
group => 'staff',
mode => '644',
recurse => 'true',
checksum => 'md5',
notify => Exec['foo']
}
exec { 'foo':
command => '/bin/echo "bar"',
refreshonly => 'true',
logoutput => 'true'
}
</pre>
In 2.6.4, I get:
<pre>
debug: /Stage[main]//File[/Users/josh/tmp/test]/notify: subscribes to Exec[foo]
info: Applying configuration version '1320097198'
debug: Finishing transaction 2165797600
...
info: Creating state file /Users/josh/.puppet/var/state/state.yaml
</pre>
In 2.6.5 and up, I get:
<pre>
err: /Stage[main]//File[/Users/josh/tmp/test]: Could not evaluate: undefined
method `notice' for nil:NilClass
notice: /Stage[main]//Exec[foo]: Dependency File[/Users/josh/tmp/test] has
failures: true
warning: /Stage[main]//Exec[foo]: Skipping because of failed dependencies
info: Creating state file /Users/josh/.puppet/var/state/state.yaml
</pre>
This is the line that is causing the problem (resource.property(:checksum) is
returning nil
<pre>
resource.property(param_name).notice "audit change: newly-recorded value
#{current_values[param_name]}"
</pre>
In order to reproduce, make sure to delete your .puppet directory between runs,
otherwise it will pickup the historical value from before and not trigger this
code path.
----------------------------------------
Bug #10388: Recursive File audit does not appear to work.
https://projects.puppetlabs.com/issues/10388
Author: Trevor Vaughan
Status: Investigating
Priority: High
Assignee:
Category:
Target version:
Affected Puppet version: 2.6.5
Keywords:
Branch:
With the following code:
<pre>
file { '/root/test':
audit => 'checksum',
owner => 'root',
group => 'root',
mode => '644',
recurse => 'true',
checksum => 'md5',
notify => Exec['foo']
}
exec { 'foo':
command => '/bin/echo "bar"',
refreshonly => 'true',
logoutput => 'true'
}
</pre>
Adding a file under /root/test causes the following error with 'puppet apply'
<pre>
otice: /File[/root/test/blah]/mode: mode changed '600' to '644'
err: /File[/root/test/blah]: Could not evaluate: undefined method `notice' for
nil:NilClass
notice: /Stage[main]//Exec[foo]: Dependency File[/root/test/blah] has failures:
true
warning: /Stage[main]//Exec[foo]: Skipping because of failed dependencies
</pre>
Changing a file under /root/test has absolutely no effect and does not fire off
Exec[foo] (which it should).
--
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.