Issue #14215 has been updated by Charlie Sharpsteen.

Category changed from file to modules
Keywords changed from failed to generate additional resources using 
eval_generate: Error 400 on SERVER: Operation not permitted recursion customer 
to eval_generate fileserving customer

Still an issue on 3.2.2. A note:

  - The file resource must be declared inside the module. Otherwise 
`eval_generate` is not used and the bug doesn't show up.

----------------------------------------
Bug #14215: Puppet does not report a run as failed if a recursive file 
definition cannot generate recursive resources
https://projects.puppetlabs.com/issues/14215#change-93814

* Author: Adrien Thebo
* Status: Accepted
* Priority: Normal
* Assignee: Charlie Sharpsteen
* Category: modules
* Target version: 
* Affected Puppet version: 2.7.9
* Keywords: eval_generate fileserving customer
* Branch: 
----------------------------------------
Given a recursive file definition, when a file or directory inside the recursed 
directory is unreadable, then the resource will not be marked as failed in the 
report and will fail silently.

# Example reproduction

A recursive file definition testfail/files/goodperms contains 
testfail/files/goodperms/badperms that is unreadable. Evaluation will fail but 
the report will not mark this as failed.

## Example file permissions

<pre>
drwx------  4 pe-puppet  pe-puppet 136 Apr 26 14:56 .
drwx------  3 pe-puppet  pe-puppet 102 Apr 26 14:57 ./files
drwx------  3 pe-puppet  pe-puppet 102 Apr 26 14:57 ./files/goodperms
d---------  3 pe-puppet  pe-puppet 102 Apr 26 14:57 ./files/goodperms/badperms
-rw-------  1 pe-puppet  pe-puppet 29 Apr 26 14:57 
./files/goodperms/badperms/date.txt
drwx------  3 pe-puppet  pe-puppet 102 Apr 26 15:14 ./manifests
-rw-------  1 pe-puppet  pe-puppet 161 Apr 26 15:09 ./manifests/init.pp
</pre>

### Example manifest

<pre>
class testfail {

  file { "/testfail":
    ensure  => directory,
    recurse => true,
    backup  => false,
    source  => "puppet:///modules/testfail/",
  }
}
</pre>

###  Output of agent run

<pre>
root@debian-6:/etc/puppetlabs/puppet# puppet agent -t
info: Retrieving plugin
info: Loading facts in facter_dot_d
info: Loading facts in pe_version
info: Loading facts in facter_dot_d
info: Loading facts in pe_version
info: Loading facts in facter_dot_d
info: Loading facts in pe_version
info: Loading facts in facter_dot_d
info: Loading facts in pe_version
info: Caching catalog for master
info: Applying configuration version '1335478240'
err: /Stage[main]/Testfail/File[/testfail]: Failed to generate additional 
resources using 'eval_generate: Error 400 on SERVER: Operation not permitted - 
/modules/testfail/files/goodperms/badperms
notice: /Stage[main]/Testfail/File[/testfail]/ensure: created
notice: Finished catalog run in 1.64 seconds
</pre>

- - -

puppetversion: 2.7.9 (Puppet Enterprise 2.0.3)

The full catalog, report, and node object for this host are attached.


-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to