After I upgraded Ubuntu on my chef server from 10.04 to 10.10, all my knife and chef clients stopped working. I received 401: Unauthorized exceptions for every query and operation.
I tried reregistering my clients (knife client reregister CLIENT
) which didn't work.
I tried regenerating my chef authentication data (removed /etc/chef/validation.pem
, restarted chef-server
, and ran knife configure --initial
on the server with chef-validation
as the admin user and the newly generated /etc/chef/validation.pem
as the certificate) which enabled my to connect to chef again with my new credentials, but now my configuration data is empty! Running knife node list
for instance returns nothing.
This indicated that the CouchDB database is empty. And indeed, there is a /var/lib/couchdb/0.10.0/chef.couch
file of 1.1GB, and an almost empty /var/lib/couchdb/1.0.1/chef.couch
file.
I am still figuring out how to recover my data, but has anyone have similar experience? How did you manage to migrate your chef database to the new CouchDB version?
I solved it by copying the data from
/var/lib/couchdb/0.10.0/
to/var/lib/couchdb/1.0.1/
while couch and chef were stopped. Remember to also copy the.chef_design
folder and setting the owner tocouchdb
! Now my old clients and knife can connect without any problems.I did have to recreate the RabbitMQ virtual host as described in http://wiki.opscode.com/display/chef/Chef+Indexer.