-
Notifications
You must be signed in to change notification settings - Fork 12
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
Butcher failes to copy client.pem, when Chef-run is cancelled with Ctrl-C #37
Comments
Interesting edge case. I'll have to investigate that and check that it's even possible to solve. It seems that when you hit control-C the second time you killed the possibility of Vagrant opening a thread for the plugin, but I'm just guessing at this point. |
I'm also seeing this, but not the Butcher output at the end. Perhaps the validator key could be used to delete the node/client if the client key cannot be found? |
@benlangfeld I don't think the validator key can be used in this fashion without opening a whole new set of security issues. It would also introduce a new dependency -- to change permissions of the validator client on the Chef server. I'll look into this issue again when I have the time, but I can't promise a date for a solution. In the meantime, pull requests are welcome! :) |
Would it be possible to double-check if the client.pem is available on the client before attempting to butcher it? |
@smuth4 That can probably be done, but if the VM is down there's no way to retrieve the key. If everyone is happy with that I'll give it a go. @DracoAter and @benlangfeld what's your opinion? |
I have a Vagrantfile that starts vagrant machine (VirtualBox) and provisions it with chef-client. I want the client and node to be removed when I run
vagrant destroy
.The problem is that when I run
vagrant up
and chef starts provisioning, if I press Ctrl-C twice to cancel process, butcher fails to copy the client.pem file. It's not something what I do very often, but the same thing takes place when the job is cancelled in Jenkins.Log output:
And as there is no client key copied,
vagrant destroy
also fails to remove client and node from chef-server. (/etc/chef/client.pem exists inside VM.)The text was updated successfully, but these errors were encountered: