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

action :destroy doesn't work, OR nodes/MACHINE.json not being written out. #43

Closed
jjasghar opened this issue Jun 5, 2017 · 4 comments
Closed

Comments

@jjasghar
Copy link

jjasghar commented Jun 5, 2017

It seems that with investigating #41 I discovered that the node/MACHINE.json was not being written out via the allocate_machine method. I have a feeling it's due to the deep_symbolize fix for Cheffish 5. This needs to be investigated further.

@jjasghar
Copy link
Author

jjasghar commented Jun 5, 2017

I should mention this means the action :destroy does not work either now. We can create the machines via c-p-vsphere, but we can't clean anything up 😭 🐼 .

@jjasghar jjasghar changed the title nodes/MACHINE.json not being written out. action :destroy doesn't work, OR nodes/MACHINE.json not being written out. Jun 5, 2017
@jjlimepoint
Copy link

Windows Server 2012, chef-client 12, action :destroy - machine is created in vsphere with provision, and then does successfully destroy

[2017-06-06T09:41:45+10:00] INFO: Processing machine[vswin1.mintpress.io] action destroy (elephant::simple-vmware line 60)
establishing connection to 172.18.100.208
[2017-06-06T09:41:48+10:00] INFO: Processing chef_node[vswin1.mintpress.io] action delete (basic_chef_client::block line 22)
[2017-06-06T09:41:48+10:00] INFO: Processing chef_client[vswin1.mintpress.io] action delete (basic_chef_client::block line 26)
[2017-06-06T09:41:48+10:00] INFO: chef_client[vswin1.mintpress.io] deleted client vswin1.mintpress.io at https://newjjosi1.mintpress.io:8443/organizations/environmint
[2017-06-06T09:41:48+10:00] INFO: Processing chef_node[vswin1.mintpress.io] action delete (basic_chef_client::block line 91)
[2017-06-06T09:41:48+10:00] INFO: HTTP Request Returned 404 Object Not Found: error
[2017-06-06T09:41:48+10:00] WARN: Skipping final node save because override_runlist was given
[2017-06-06T09:41:48+10:00] INFO: Chef Run complete in 5.311051103 seconds
[2017-06-06T09:41:48+10:00] INFO: Skipping removal of unused files from the cache
[2017-06-06T09:41:48+10:00] INFO: Running report handlers [2017-06-06T09:41:48+10:00] INFO: Report handlers complete

Node before destroy:

[root@newjjosi1:~]# knife node show vswin1.mintpress.io -F j
{
"name": "vswin1.mintpress.io",
"chef_environment": "environmint",
"run_list": [

]
,
"normal": {
"tags": null,
"chef_provisioning": {
"reference": {
"driver_url": "vsphere://172.18.100.208/sdk?use_ssl=true&insecure=true",
"driver_version": "2.0.4",
"server_id": "50388c4d-94f8-473f-782f-a18af7779037",
"is_windows": true,
"allocated_at": "2017-06-05 23:37:35 UTC",
"ipaddress": "172.18.138.175"
}
}
}
}

Client:
[mintpress@newjjosi1:cookbooks]$ chef-client -v
Chef: 12.18.31

@jjlimepoint
Copy link

And with chef 13:

[root@newjjosi1:tmp]# /opt/chefdk/embedded/bin/knife node show vswin1.mintpress.io -F j
{
"name": "vswin1.mintpress.io",
"chef_environment": "environmint",
"run_list": [

]
,
"normal": {
"tags": null,
"chef_provisioning": {
"reference": {
"driver_url": "vsphere://172.18.100.208/sdk?use_ssl=true&insecure=true",
"driver_version": "2.0.4",
"server_id": "50387b1f-e119-05bf-1471-8d5b8f423631",
"is_windows": true,
"allocated_at": "2017-06-05 23:54:10 UTC",
"ipaddress": "172.18.138.176"
}
}
}
}

[mintpress@newjjosi1:cookbooks]$ chef-client --config ~/.chef/client.rb -o elephant::simple-vmware 2>&1 | tee jj.log
Starting Chef Client, version 13.1.31
[2017-06-06T09:57:19+10:00] WARN: Run List override has been provided.
[2017-06-06T09:57:19+10:00] WARN: Original Run List: []
[2017-06-06T09:57:19+10:00] WARN: Overridden Run List: [recipe[elephant::simple-vmware]]
resolving cookbooks for run list: ["elephant::simple-vmware"]
Synchronizing Cookbooks:

  • elephant (0.1.0)
    Installing Cookbook Gems:
    Compiling Cookbooks...
    Converging 1 resources
    Recipe: elephant::simple-vmware
  • machine[vswin1.mintpress.io] action destroy/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/cheffish-13.0.0/lib/cheffish/merged_config.rb:6: warning: toplevel constant Mash referenced by Chef::Mash
    /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/cheffish-13.0.0/lib/cheffish/merged_config.rb:7: warning: toplevel constant Mash referenced by Chef::Mash
    establishing connection to 172.18.100.208

Running handlers:
Running handlers complete
Chef Client finished, 1/1 resources updated in 04 seconds

@jjasghar
Copy link
Author

jjasghar commented Jun 6, 2017

Non-issue, it seems it was a configuration issue on my test environment.

@jjasghar jjasghar closed this as completed Jun 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants