Hello, Actually, I had this in my puppetserver manifest :
- tidy {'/opt/puppetlabs/server/data/puppetserver/reports': - age => '4d', - matches => '*.yaml', - recurse => true, - rmdirs => false, - type => ctime, - } And this is the reason whey all the generated report files where being referenced into state.yaml ! Now, I've removed this code, and I have as well changed the way the reports are stored. I don't need the YAML report files, as I already use PuppetDB + Foreman. So, now I can see the state.yaml file is slowly decreasing (I need to wait 32 days until all old reports will be cleaned). Thank you Cheers Yvan On Fri, Feb 7, 2020 at 7:55 PM Josh Cooper <j...@puppet.com> wrote: > > > On Fri, Feb 7, 2020 at 2:11 AM Yvan Broccard <yvan.brocc...@gmail.com> > wrote: > >> Hi, >> About the growing state.yaml : >> I have upgraded to version 6.7 in the mean time. I've seen in the code >> that the issue with :statettl was fixed. >> As the default setting is 32days, I still need to wait a couple of days >> before being sure it works, as I still had a "tidy" statement for cleanup >> up Puppet reports until recently. >> I still have a huge state.yaml file, containing 200'000 lines, and >> referencing 60'000 reports that have already been removed, but they are >> only reports generated during the last month, with the oldest entries with >> a ":checked:" date of 2020-01-06 >> > > That's odd. Are those yaml reports that puppetserver received and stored > locally due to the default puppet setting "reports=store"? Puppetserver > should be storing reports in > /opt/puppetlabs/server/data/puppetserver/reports/<client>/*yaml, so those > should not appear in state.yaml. Can you confirm whether puppetserver is > loading/updating state.yaml or only the local puppet agent running on the > server. For example to confirm puppetserver isn't accessing that file: > > $ sudo strace -p <puppetserver java pid> -P > /opt/puppetlabs/puppet/cache/state/state.yaml > > Only the agent should ever access the state file and I wouldn't expect > reports to be in there. But it's possible a puppetserver extension > (function, report processor, hiera backend, ...) could be calling > Puppet::Util::Storage.load/store erroneously. > > >> ... So I guess it works ! >> >> Thank you for clarifying this issue ! >> >> Yvan >> >> >> -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAMuuXv3Jw_54ph4xN9XP%3DHEZDseay3s5uHP7fURp2%3Dp14S_kpg%40mail.gmail.com.