State file constantly growing

asked 2014-05-13 13:51:06 -0600

zoredache gravatar image

updated 2014-05-13 13:54:02 -0600

My puppet master has been becoming slower, and slower each day. I finally decided to take a look at it, I have a vague idea about what the problem is, but I don't understand, why it is doing what it is doing, or what the fix is.

I looked at my /var/lib/puppet/state/state.yaml and it is currently ~35mb. The bulk of the entries are like this.

  File[/var/lib/puppet/reports/srv-02.example.org/201309061752.yaml]: 
    !ruby/sym checked: 2013-09-13 22:30:25.473529 -07:00
    !ruby/sym synced: 2013-09-13 22:30:25.479541 -07:00

Which seems to correspond to my use of the tidy type to clean up old reports.

tidy {"/var/lib/puppet/reports":
  age =>"1w",
  recurse=> true,
  schedule => 'daily',
}

I am confused here, because most(all?) of the files in my state.yaml seem to correspond to files that have already been purged. If the file has been purged, why is it still part of the state.yaml?

Is the tidy resource broke? Should I just use an exec that calls find path -type f -delete?

How do I use tidy to delete old files without having state file become bloated?

edit retag flag offensive close merge delete