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

Unable to create an Instance on us-east-2 #529

Open
catalinvr opened this issue Mar 20, 2017 · 2 comments
Open

Unable to create an Instance on us-east-2 #529

catalinvr opened this issue Mar 20, 2017 · 2 comments

Comments

@catalinvr
Copy link

Hi guys,

I'm not able to converge an EC2 instance in US-EAST-2.
The instance is created but chef is throws the following error:

undefined method `name' for nil:NilClass on

[2017-03-20T14:26:06+02:00] DEBUG: Re-raising exception: NoMethodError - machine[Ubuntu_Server_14.04_x64_v1.2.4_2017.3.20_EBS_HVM] (my_ubuntu_instance::provisioning_machine line 37) had an error: NoMethodError: undefined method name' for nil:NilClass /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-provisioning-aws-2.1.0/lib/chef/provisioning/aws_driver/driver.rb:1031:in default_ami_for_criteria'
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-provisioning-aws-2.1.0/lib/chef/provisioning/aws_driver/driver.rb:1042:in default_ami_for_region' /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-provisioning-aws-2.1.0/lib/chef/provisioning/aws_driver/driver.rb:856:in bootstrap_options_for'

Here you can find the logfile: http://pastebin.com/k2NLJvfC

@cheeragpatel
Copy link

Check your cheffish version, we were also seeing this issue, updating to cheffish 4.1.1 resolved the issue with chef-provisioning-aws 2.1.0.

@lovejoey11
Copy link
Contributor

I had the same issue before, please check your driver configuration in knife.rb. The driver option should look like

driver 'aws:<profile name>'
driver_options :compute_options => {
                                     :aws_access_key_id => '<key_id>',
                                     :aws_secret_access_key => '<key>',
                                     :region => 'us-east-2'
                                    }

Your recipe dependency declaration. should look like

require 'chef/provisioning'
require 'chef/provisioning/aws_driver'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants