Closed chechuironman closed 9 years ago
@chechuironman ,
Looks like you're on an older version of fog-softlayer, please update to the latest version and let me know if the issue still presents.
Since this was opened a couple months I'm going to close it for now, reopen as needed.
I'm having a similar issue with both provisioning and just listing the flavors:
root@chef-ws:/home/chef-repo# knife softlayer server create --hostname chef0 --domain demo.com --flavor small -VV
INFO: Using configuration from /home/chef-repo/.chef/knife.rb
Launching SoftLayer VM, this may take a few minutes.
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/fog-softlayer-0.3.28/lib/fog/softlayer/models/compute/server.rb:418:in extract_flavor': undefined method
cpu' for nil:NilClass (NoMethodError)
from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/fog-softlayer-0.3.28/lib/fog/softlayer/models/compute/server.rb:122:in pre_save' from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/fog-softlayer-0.3.28/lib/fog/softlayer/models/compute/server.rb:311:in
save'
from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/fog-core-1.27.3/lib/fog/core/collection.rb:51:in create' from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/knife-softlayer-0.3.9/lib/chef/knife/softlayer_server_create.rb:295:in
run'
from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:417:in block in run_with_pretty_exceptions' from /opt/chef/embedded/apps/chef/lib/chef/local_mode.rb:38:in
with_server_connectivity'
from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:416:in run_with_pretty_exceptions' from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:213:in
run'
from /opt/chef/embedded/apps/chef/lib/chef/application/knife.rb:139:in run' from /opt/chef/embedded/apps/chef/bin/knife:25:in
<top (required)>'
from /usr/bin/knife:40:in load' from /usr/bin/knife:40:in
root@chef-ws:/home/chef-repo# knife softlayer flavor list -VV
INFO: Using configuration from /home/chef-repo/.chef/knife.rb
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/fog-core-1.27.3/lib/fog/core/collection.rb:103:in table': undefined method
display_table' for Fog::Formatador:Class (NoMethodError)
from /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/knife-softlayer-0.3.9/lib/chef/knife/softlayer_flavor_list.rb:43:in run' from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:417:in
block in run_with_pretty_exceptions'
from /opt/chef/embedded/apps/chef/lib/chef/local_mode.rb:38:in with_server_connectivity' from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:416:in
run_with_pretty_exceptions'
from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:213:in run' from /opt/chef/embedded/apps/chef/lib/chef/application/knife.rb:139:in
run'
from /opt/chef/embedded/apps/chef/bin/knife:25:in <top (required)>' from /usr/bin/knife:40:in
load'
from /usr/bin/knife:40:in `
I installed the knife just today so everything should be the latest version.
@doubletb00 ,
Thanks for reporting this, I've been able to replicate and a fix is on the way.
@doubletb00,
Your first error was caused by using the wrong flavor name.
Your second (discovered when you tried to list the flavor names) has been fixed.
Install the latest version of knife-softlayer and you should be in business.
Perfect. Thanks for your help!
here the url to gist with the error
https://gist.github.com/chechuironman/0d5f0369703465ca1e0c