theforeman/puppet-foreman — pull request #240 by mhjacks (2014-10-16 23:47:25+00:00)
Title: Directory recursion is problematic in large environments

I manage a large environment; we started seeing significant performance hits on our puppetmasters when we got to 15,000 nodes. The recurse on the directory forces stats of each of the yaml files in all the subdirs, which causes high CPU utilization and memory utilization of the puppet agent process. We addressed this by removing the recurse parameter from the file resource.

Also, since there is potentially sensitive data in those yaml files, maybe it would be a good idea to set more restrictive permissions, such as 750, in those directories? I can add the "normal" subdirectories {facts,node} in this pull request as well, if you'd like. (Or create a separate PR for that.)