==> default: Running cleanup tasks for 'chef_client' provisioner...
==> default: Deleting client "chef-test" from Chef server...
==> default: Cleaning up the 'client' for Chef failed. The stdout and
==> default: stderr are shown below. Vagrant will continue destroying the machine,
==> default: so please clean up these resources manually.
==> default:
==> default: stdout: Response: Cannot load client chef-test
==> default:
==> default:
==> default: stderr: ERROR: The object you are looking for could not be found
==> default: Deleting node "chef-test" from Chef server...
==> default: Cleaning up the 'node' for Chef failed. The stdout and
==> default: stderr are shown below. Vagrant will continue destroying the machine,
==> default: so please clean up these resources manually.
==> default:
==> default: stdout: Response: node 'chef-test' not found
==> default:
==> default:
==> default: stderr: ERROR: The object you are looking for could not be found
対応策
未解決
chef is not part of the bundle エラー
内容
下記の設定がされている状態で、vagrant destory を実行すると VM は削除されるが、chef server 上の Nodes/Clients から情報が削除されない。
chef is not part of the bundle. Add it to Gemfile. (Gem::LoadError) のエラーを吐いて処理が終了してしまう。
エラーログ
12345678910111213141516171819202122232425262728
$ vagrant destroy -f
WARNING: Could not load IOV methods. Check your GSSAPI C library for an update
WARNING: Could not load AEAD methods. Check your GSSAPI C library for an update
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
==> default: Running cleanup tasks for 'chef_client' provisioner...
==> default: Deleting client "vagrant-win7.example.local" from Chef server...
==> default: Cleaning up the 'client' for Chef failed. The stdout and
==> default: stderr are shown below. Vagrant will continue destroying the machine,
==> default: so please clean up these resources manually.
==> default:
==> default: stdout:
==> default:
==> default: stderr: /Applications/Vagrant/embedded/gems/gems/bundler-1.6.2/lib/bundler/rubygems_integration.rb:252:in `block in replace_gem': chef is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
==> default: from /Users/ryo/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/bin/knife:22:in `<main>'
==> default: from /Users/ryo/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/bin/ruby_executable_hooks:15:in `eval'
==> default: from /Users/ryo/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/bin/ruby_executable_hooks:15:in `<main>'
==> default: Deleting node "vagrant-win7.example.local" from Chef server...
==> default: Cleaning up the 'node' for Chef failed. The stdout and
==> default: stderr are shown below. Vagrant will continue destroying the machine,
==> default: so please clean up these resources manually.
==> default:
==> default: stdout:
==> default:
==> default: stderr: /Applications/Vagrant/embedded/gems/gems/bundler-1.6.2/lib/bundler/rubygems_integration.rb:252:in `block in replace_gem': chef is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
==> default: from /Users/ryo/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/bin/knife:22:in `<main>'
==> default: from /Users/ryo/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/bin/ruby_executable_hooks:15:in `eval'
==> default: from /Users/ryo/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/bin/ruby_executable_hooks:15:in `<main>'
対応策
Vagrant の Version を 1.6.5 に上げる
Vagrant 1.6.3 だとエラーが出るが、 1.6.5 だとエラーが出ず、Chef Server 上から Nodes/Clients から情報が削除される。
NameError
内容
下記の設定がされている状態で、vagrant destory を実行すると VM は削除されるが、chef server 上の Nodes/Clients から情報が削除されない。
$ vagrant destroy -f
WARNING: Could not load IOV methods. Check your GSSAPI C library for an update
WARNING: Could not load AEAD methods. Check your GSSAPI C library for an update
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
==> default: Running cleanup tasks for 'chef_client' provisioner...
==> default: Deleting client "" from Chef server...
/Users/ryo/.vagrant.d/gems/gems/vagrant-berkshelf-3.0.1/lib/berkshelf/vagrant/action/clean.rb:21:in `rescue in call': uninitialized constant Berkshelf::BerkshelfError (NameError)