chef-boneyard/chef-provisioning

chef 12.4.0 and chef-provisioning have a problem when bootstrapping a node

Closed this issue · 5 comments

https://christinemdraper.wordpress.com/2015/01/31/deploying-a-multi-node-application-to-aws-using-chef-provisioning/
When following the steps outlined here I consistently got an error:

RuntimeError: private_key[in_memory](basic_chef_client::block line 79) had an error: RuntimeError: Could not read private key from none: missing pass phrase?

relevant console output
https://gist.github.com/jfarr-sds/379abe0d626379592fb2#file-gistfile1-txt-L100

and stack trace:
https://gist.github.com/jfarr-sds/8f2f9ff6f83b12c7ae1b

Reverting chef to 12.3.0 resolved the issue

Yes, this is certainly an error with Chef 12.4.0. When I made some code updates to fix that error I started running into errors with bootstrapping no longer working. Trying to figure out what happened today

https://github.com/chef/cheffish/blob/master/lib/chef/provider/private_key.rb#L54

In 12.3.0 current_resource.action is [:delete], and in 12.4.0 it is :delete - this is causing the error above.

current_resource should come from load_current_resource and the action is set by https://github.com/chef/cheffish/blob/master/lib/chef/provider/private_key.rb#L215

Pulling in the changes from chef/chef#3605 fixed this issue for me!

Leaving this open so that when 12.4.1 is released we can make sure and test this again, as well as ensuring the ChefDK gets that version packaged into it

I'm going to close this because these changes are in the latest ChefDK RC (> 0.7.0.rc.3) builds - you can obtain it by following the instructions at https://github.com/chef/chef-dk/blob/master/README.md#pre-release-candiates