Skip to content

Instantly share code, notes, and snippets.

@clifferson
Created January 19, 2013 04:17
Show Gist options
  • Save clifferson/4570717 to your computer and use it in GitHub Desktop.
Save clifferson/4570717 to your computer and use it in GitHub Desktop.
If your chef-server checksum dir gets out of whack with couchdb
/usr/bin/find /var/cache/chef/checksums/ -maxdepth 1 -type f -ctime +1 -delete
Then delete all the checksums in CouchDB using Shef:
require 'chef/checksum'
r = Chef::REST.new('http://localhost:5984/chef/_design/checksums/_view/', false, false)
r.get_rest("all")["rows"].each do |c| c["value"].cdb_destroy end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment