Issue #6717 has been updated by Jason Smith.
Nick Lewis wrote: > It looks like the reports:prune task is only deleting reports, not destroying > them. This causes the associated resource_statuses, metrics, report_logs, and > resource_events not to be destroyed either. I can also confirm this bug report. We changed line 53 of lib/tasks/prune_reports.rake from Report.delete_all() to Report.destroy_all() and it looks like it is now deleting all dependent records. Doing this will only affect records deleted subsequent to this change though, it does not prune out the now orphaned records left in the other tables from the previous deletes. We had to purge them out manually. Is this change correct or safe to do? We will soon be scaling our puppet deployment up as we move from testing to production over the next few weeks and can't afford to fill up our database because the number of nodes has increased by a few orders of magnitude. ---------------------------------------- Feature #6717: Cleanup of table resource_statuses in dashboard-database https://projects.puppetlabs.com/issues/6717 Author: Bart Descamps Status: Unreviewed Priority: Normal Assignee: Category: Target version: Keywords: dashboard, resource_statuses, cleanup Branch: Affected URL: Affected Dashboard version: 1.1.0rc1 Recently our dashboard-database reached about 90% of it's assigned diskspace and I suspected the reports to be the cause. However, we do already use the rake prune:reports feature (in a cronjob) so our older reports are automatically purged. The problem wasn't with the reports though but with the table resource_statuses. It had grown over 21 GB. I deleted the oldest records (which wasn't that easy as this locks the mysql-table (innodb)). Having a similar tool (rakefile) as is available for the reports would be quite nice though. I don't really see the benefit of keeping lots of old resource statuses anyway, so being able to schedule another cronjob that cleans these up would be nice. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
