airbnb / puppet-munki

Other
28 stars 17 forks source link

Managing permissions on /usr/local/munki generates warning on puppet 6.24 + #17

Closed gavinelder closed 2 months ago

gavinelder commented 3 years ago

As Muni now ships with redistributable python install it adds a significant amount of files within '/usr/local/munki' on puppet 7 and later this now generates a warning.

This is also something we should consider optimizing where possible.

Warning: The directory '/usr/local/munki' contains 7596 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

https://github.com/airbnb/puppet-munki/blob/f7c1b185682fc37e2ba1b8b724e18907a69000a9/manifests/install.pp#L20-L27

Potential Approaches

grahamgilbert commented 3 years ago

We aren’t on puppet 7 yet. Assuming it is backwards compatible, setting max_files to -1 feels like the right thing to do here. We still need to manage munki’s permissions, and anything else we do will just be replicating what the built in file provider is doing imo.

gavinelder commented 3 years ago

True I think this is one to park for now as backward compatibility seems to be a sticking point.

Currently, max_files is only present on the latest 6 & newer 7 releases.

My thought was potentially not managing the python by only recursing 1 directory deep, but I can see how that can be an issue.