3

I have setup stored configuration primarily as a method to manage my ssh known_hosts. Unfortunately as I retire hosts the old configs still exist in my database. The answer seems to be run the command puppet node clean <hostname>.

The problem is that while this does command does run, and does clean up some data, it doesn't seem to clean up everything.

For example I can still find values in the puppet_tags table that only applied to a hosts that no longer exists.

What should I be doing to keep my stored configuration database clean of all extra junk that seems to be building up?

P.S. Can anyone point me any documentation for the stored configuration schema?  If I could find good documentation, or at least an entity-relationship-diagram, I would be tempted to just do some manual clean-up.

Zoredache
  • 130,897
  • 41
  • 276
  • 420
  • The requirements of this question are not specific. What are all of the tables/fields that have extra data building up? –  Oct 21 '12 at 08:42

1 Answers1

2

Storedconfigs are stored as activerecord models.

Here's the schema:

https://github.com/puppetlabs/puppet/blob/master/lib/puppet/rails/database/schema.rb

If you really want an ER diagram, it can be extracted from the source with something like http://rails-erd.rubyforge.org

  • This is useful, and I am awarding the bounty since it would be lost other wise. I am not going to mark this as accepted though since it doesn't really answer the core question about cleaning up some of the extra cruft. – Zoredache Oct 18 '12 at 20:11