[chef] Re: Can't re-create node after restoring CouchDB


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Can't re-create node after restoring CouchDB
  • Date: Tue, 26 Mar 2013 12:48:11 -0700

delete the client from chef server using knife (knife client delete <node name>), and delete the old client.pem from the node itself. then run chef-client on the node, and it will reregister itself.



On Tue, Mar 26, 2013 at 12:45 PM, Jochen Lillich < " target="_blank"> > wrote:
Hi!

I had a corrupted chef.couchdb and had to restore last night's backup.
After re-uploading today's changes, everything seems to work fine.

Only a node that I added during the day can't be recreated. It's not in
the node list (it didn't yet exist last night, after all), it's not in
CouchDB (as far as I can see), but bootstrapping the client gives me

    HTTP Request Returned 409 Conflict: Client already exists
    HTTP Request Returned 403 Forbidden: You are not allowed to take
this action.

`knife node create MYNODENAME` causes the following server stack trace:

---8<------8<------8<------8<------8<------8<------8<------8<---

chef-server (api) : worker (port 4000) ~ undefined method `update_from!'
for nil:NilClass -
(NoMethodError)/usr/share/chef-server-api/app/controllers/nodes.rb:68:in
`update'/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:315:in
`send'/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:315:in
`_call_action'/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:289:in
`_dispatch'/usr/lib/ruby/1.8/merb-core/controller/merb_controller.rb:252:in
`_dispatch'/usr/lib/ruby/1.8/merb-core/dispatch/dispatcher.rb:102:in
`dispatch_action'/usr/lib/ruby/1.8/merb-core/dispatch/dispatcher.rb:74:in `handle'/usr/lib/ruby/1.8/merb-core/dispatch/dispatcher.rb:36:in
`handle'/usr/lib/ruby/1.8/merb-core/rack/application.rb:17:in `call'
/usr/lib/ruby/1.8/merb-core/rack/middleware/static.rb:28:in
`call'/usr/lib/ruby/1.8/rack/content_length.rb:13:in `call'
/usr/lib/ruby/1.8/thin/connection.rb:76:in `pre_process'
/usr/lib/ruby/1.8/thin/connection.rb:74:in `catch'
/usr/lib/ruby/1.8/thin/connection.rb:74:in `pre_process'
/usr/lib/ruby/1.8/thin/connection.rb:57:in `process'
/usr/lib/ruby/1.8/thin/connection.rb:42:in `receive_data'
/usr/lib/ruby/vendor_ruby/eventmachine.rb:256:in `run_machine'
/usr/lib/ruby/vendor_ruby/eventmachine.rb:256:in `run'
/usr/lib/ruby/1.8/thin/backends/base.rb:57:in `start'
/usr/lib/ruby/1.8/thin/server.rb:156:in `start'
/usr/lib/ruby/1.8/merb-core/rack/adapter/thin.rb:30:in `start_server'
/usr/lib/ruby/1.8/merb-core/rack/adapter/abstract.rb:298:in `start_at_port'
/usr/lib/ruby/1.8/merb-core/rack/adapter/abstract.rb:95:in `spawn_worker'
/usr/lib/ruby/1.8/merb-core/rack/adapter/abstract.rb:139:in `start'
/usr/lib/ruby/1.8/merb-core/rack/adapter/abstract.rb:138:in `upto'
/usr/lib/ruby/1.8/merb-core/rack/adapter/abstract.rb:138:in `start'
/usr/lib/ruby/1.8/merb-core/rack/adapter/abstract.rb:137:in `catch'
/usr/lib/ruby/1.8/merb-core/rack/adapter/abstract.rb:137:in `start'
/usr/lib/ruby/1.8/merb-core/server.rb:174:in `bootup'
/usr/lib/ruby/1.8/merb-core/server.rb:159:in `daemonize'
/usr/lib/ruby/1.8/merb-core/server.rb:143:in `fork'
/usr/lib/ruby/1.8/merb-core/server.rb:143:in `daemonize'
/usr/lib/ruby/1.8/merb-core/server.rb:35:in `start'
/usr/lib/ruby/1.8/merb-core.rb:170:in `start'
/usr/sbin/chef-server:86

---8<------8<------8<------8<------8<------8<------8<------8<---

Is there something outside CouchDB that prevents the node from being
created?

Best regards,
  Jochen




Archive powered by MHonArc 2.6.16.

§