When a recipe is deleted we should also delete the rendered_kickstart row it was referring to. This will help prevent the rendered_kickstart table from growing so rapidly. It might be nice if we could return 410 Gone instead of 404 Not Found for kickstarts which have been deleted, in case somebody comes across an old kickstart URL. I'm not sure if there's any efficient way to do that though. Something else to consider: beaker-transfer could move the kickstarts from the database to the archive server, to help keep the size of the rendered_kickstart table down. (Need to set rendered_kickstart.kickstart to NULL and rendered_kickstart.url to point to the new location on the archive server.)
So perhaps just removing them when we deleting a recipe would be the easiest solution. Can't think of why we would need them around beyond the life of a recipe, and these ones are a decent chunk of the total size.
On Gerrit: http://gerrit.beaker-project.org/1521
mysql> SELECT COUNT(*) AS non_nulled_ks_ids FROM job INNER JOIN recipe_set ON recipe_set.job_id = job.id INNER JOIN recipe ON recipe.recipe_set_id = recipe_set.id AND recipe.rendered_kickstart_id IS NOT NULL WHERE job.deleted IS NOT NULL; +-------------------+ | non_nulled_ks_ids | +-------------------+ | 0 | +-------------------+ 1 row in set (0.01 sec)
Beaker 0.11.0 has been released.