max_files parameter for recursive file resource (Puppet >= 6.23.0 and >= 7.7.0)
laugmanuel opened this issue · comments
Manuel Laug commented
From Puppet 6.23.0 and 7.7.0 onwards, the file resource throws a warning if used with on a directory with recurse => true
and more than 1000 files.
In large Foreman setups, this limit is reached in /var/lib/tftpboot/grub
and /var/lib/tftpboot/grub2
causing the following warning:
Jun 25 02:24:11 foreman-proxy-01 puppet-agent[31076]: The directory '/var/lib/tftpboot/grub' contains 2118 entries, which exceeds the default soft limit 1000 and may cause excessive resource consumption and degraded performance. To remove this warning set a value for `max_files` parameter or consider using an alternate method to manage large directory trees
Jun 25 02:24:15 foreman-proxy-01 puppet-agent[31076]: The directory '/var/lib/tftpboot/grub2' contains 1856 entries, which exceeds the default soft limit 1000 and may cause excessive resource consumption and degraded performance. To remove this warning set a value for `max_files` parameter or consider using an alternate method to manage large directory trees
There is the option to set max_files
to -1
to disable the warning.
Release notes: https://puppet.com/docs/puppet/6/release_notes_puppet.html#enhancements_puppet_x_23_0-PUP-10946
Issue: https://tickets.puppetlabs.com/browse/PUP-10946
Thomas Merz commented
This can/will/should be fixed by #706
I tested this change in our environment and warning has vanished 👍