Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chef client and node delete still error on vagrant destroy in 1.7.1 #5021

Closed
glenbot opened this issue Dec 18, 2014 · 3 comments · Fixed by #5116
Closed

Chef client and node delete still error on vagrant destroy in 1.7.1 #5021

glenbot opened this issue Dec 18, 2014 · 3 comments · Fixed by #5116

Comments

@glenbot
Copy link

glenbot commented Dec 18, 2014

There was an issue in 1.6.5 with deleting the client and node on vagrant destroy. A new issue happens now in 1.7.1

==> default: Deleting client "Glens-Air-2-aa84fd" from Chef server...
/opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/provisioners/chef/provisioner/chef_client.rb:113:in `block in delete_from_chef_server': undefined method `with_clean_env' for Vagrant::Util::Env:Class (NoMethodError)
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/shared_helpers.rb:20:in `block in global_lock'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/shared_helpers.rb:19:in `synchronize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/shared_helpers.rb:19:in `global_lock'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/provisioners/chef/provisioner/chef_client.rb:112:in `delete_from_chef_server'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/provisioners/chef/provisioner/chef_client.rb:34:in `cleanup'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builtin/provisioner_cleanup.rb:37:in `block in do_cleanup'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builtin/provisioner_cleanup.rb:33:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builtin/provisioner_cleanup.rb:33:in `do_cleanup'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builtin/provisioner_cleanup.rb:26:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:989:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:1019:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:212:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:1389:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:394:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:244:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:244:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:1233:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:99:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:273:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:143:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builtin/env_set.rb:19:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:1233:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:273:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/glenbot/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:160:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/machine.rb:212:in `action_raw'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/machine.rb:189:in `block in action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/environment.rb:516:in `lock'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/machine.rb:176:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/machine.rb:176:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/destroy/command.rb:31:in `block in execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/plugin/v2/command.rb:226:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/plugin/v2/command.rb:220:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/plugin/v2/command.rb:220:in `with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/plugins/commands/destroy/command.rb:30:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/environment.rb:301:in `cli'
    from /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.1/bin/vagrant:174:in `<main>'
@glenbot glenbot changed the title Client and node still error on vagrant destroy in 1.7.1 Client and node delete still error on vagrant destroy in 1.7.1 Dec 18, 2014
@glenbot glenbot changed the title Client and node delete still error on vagrant destroy in 1.7.1 Chef client and node delete still error on vagrant destroy in 1.7.1 Dec 18, 2014
@wjimenez5271
Copy link

Observing the same issue with Vagrant 1.7.1. Using vagrant provisioner with chef client 11.16.4.

@wjimenez5271
Copy link

FWIW, I found that this vagrant plugin does work with 1.7.1 to accomplish the same thing: https://github.com/cassianoleal/vagrant-butcher

@windowsrefund
Copy link

I saw this behavior with the docker provider and solved it by using create_args to set the container's hostname.

c.vm.provider :docker do |d|
d.name = "client1"
d.create_args = ["-h", d.name]
...

sethvargo added a commit that referenced this issue Jan 6, 2015
@ghost ghost locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants