[chef] knife ec2 server list issue


Chronological Thread 
  • From: Travis Cole < >
  • To:
  • Subject: [chef] knife ec2 server list issue
  • Date: Thu, 7 Apr 2011 16:41:19 -0700

I recently started running into an issue with the 'knife ec2 server list' that I suspect is caused by knife having an issue handling responses from Amazon.

I'm using the Opscode platform free account.

With Ruby 1.8.7 and Chef 0.9.14 on OS X I get this output:

4:20PM < :~/chef-repo 1 %> knife ec2 server list
DEBUG: Using configuration from /Users/kelp/chef-repo/.chef/knife.rb
  [WARN] Fog::AWS::Compute.new is deprecated, use Fog::Compute.new(:provider => 'AWS') instead (/Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/fog-0.7.2/lib/fog/core/service.rb:58:in `new')
  [WARN] Fog::AWS::Compute::Server => #ip_address is deprecated, use #public_ip_address instead (/Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/fog-0.7.2/lib/fog/compute/models/aws/server.rb:9)
  [WARN] Fog::AWS::Compute::Server => #ip_address is deprecated, use #public_ip_address instead (/Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/fog-0.7.2/lib/fog/compute/models/aws/server.rb:9)
  [WARN] Fog::AWS::Compute::Server => #ip_address is deprecated, use #public_ip_address instead (/Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/fog-0.7.2/lib/fog/compute/models/aws/server.rb:9)
  [WARN] Fog::AWS::Compute::Server => #ip_address is deprecated, use #public_ip_address instead (/Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/fog-0.7.2/lib/fog/compute/models/aws/server.rb:9)
  [WARN] Fog::AWS::Compute::Server => #ip_address is deprecated, use #public_ip_address instead (/Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/fog-0.7.2/lib/fog/compute/models/aws/server.rb:9)
/Users/kelp/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/erb.rb:330:in `scan_line': private method `scan' called for {}:Hash (NoMethodError)
from /Users/kelp/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/erb.rb:318:in `call'
from /Users/kelp/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/erb.rb:318:in `percent_line'
from /Users/kelp/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/erb.rb:308:in `scan'
from /Users/kelp/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/erb.rb:307:in `each'
from /Users/kelp/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/erb.rb:307:in `scan'
from /Users/kelp/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/erb.rb:500:in `compile'
from /Users/kelp/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/erb.rb:668:in `initialize'
from /Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/highline-1.6.1/lib/highline.rb:376:in `new'
from /Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/highline-1.6.1/lib/highline.rb:376:in `list'
from /Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/highline-1.6.1/lib/highline.rb:375:in `map'
from /Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/highline-1.6.1/lib/highline.rb:375:in `list'
from /Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/chef-0.9.14/lib/chef/knife/ec2_server_list.rb:82:in `run'
from /Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/chef-0.9.14/lib/chef/knife.rb:127:in `run'
from /Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/chef-0.9.14/lib/chef/application/knife.rb:121:in `run'
from /Users/kelp/.rvm/gems/ruby-1.8.7-p334/gems/chef-0.9.14/bin/knife:25
from /Users/kelp/.rvm/gems/ruby-1.8.7-p334/bin/knife:19:in `load'
from /Users/kelp/.rvm/gems/ruby-1.8.7-p334/bin/knife:19

If I switch to chef 0.10.0.beta.7 and knife-ec2 0.5.4 I basically get the same result:

 4:28PM < :~/chef-repo 1 %> knife ec2 server list        
ERROR: knife encountered an unexpected error
This may be a bug in the 'ec2 server list' knife command or plugin
Exception: NoMethodError: private method `scan' called for {}:Hash

Same thing on Ruby 1.9.2p180 on OS X or Ubuntu 10.04.

Interestingly this problem only shows up in my QA ec2 account. It works fine in my production ec2 account, which makes me think it's something knife doesn't like in my QA account. I was testing VPC there, but hadn't got knife to work with it yet.

knife ec2 server create works fine.

Any idea what's going on here? Or something I could look at to track it down?

-kelp
Zoosk Ops




Archive powered by MHonArc 2.6.16.

§