Skip to content
This repository has been archived by the owner on Jul 6, 2018. It is now read-only.

machine destory not calling 'vagrant destroy vm-name' #13

Closed
kramvan1 opened this issue Jan 26, 2015 · 3 comments
Closed

machine destory not calling 'vagrant destroy vm-name' #13

kramvan1 opened this issue Jan 26, 2015 · 3 comments

Comments

@kramvan1
Copy link
Contributor

On win 7 setup, I using chef provisioning vagrant 0.8.1 (with chefdk 0.3.6)

Converging 1 resources
Recipe: @recipe_files::C:/Users/IBM_ADMIN/cookbooks/chef-openstack-testing-stack/destroy_all.rb
  * machine_batch[default] action destroy
    - delete node controller at http://localhost:8889
    - delete client controller at clients
    - delete file C:/Users/IBM_ADMIN/cookbooks/chef-openstack-testing-stack/vms/controller.vm

I expected to see the first action under destroy be: run vagrant destroy -f controller (status was 'running')

I double checked the status before trying this, and it's

PS ~\cookbooks\chef-openstack-testing-stack\vms> vagrant status controller
Current machine states:

controller                running (virtualbox)

Looking thru the code, I don't see the issue yet or why it would go down this path and skip the vagrant destroy step when the status is 'running'. Looks like the code just looks for any status besides 'not_created'. https://github.com/chef/chef-provisioning-vagrant/blob/master/lib/chef/provisioning/vagrant_driver/driver.rb#L110

my destroy_all recipe:

require 'chef/provisioning'

machine_batch do
    machines search(:node, '*:*').map { |n| n.name }
      action :destroy
end

not sure where to look next, so asking for help.

@kramvan1
Copy link
Contributor Author

Jusy retried this again with ChefDK 0.4.0, same results, the cmd to destroy the vm is still missing.

@kramvan1
Copy link
Contributor Author

found the fix, silly eol stuff. #14

@jkeiser
Copy link
Contributor

jkeiser commented Feb 21, 2015

Closing per fix. Thanks!

@jkeiser jkeiser closed this as completed Feb 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants