Created
January 19, 2013 04:17
-
-
Save clifferson/4570717 to your computer and use it in GitHub Desktop.
If your chef-server checksum dir gets out of whack with couchdb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/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