chef-boneyard / knife-rackspace

Chef knife plug-in for Rackspace
https://github.com/chef/knife-rackspace
Apache License 2.0
153 stars 114 forks source link

Error creating machine after new CHEFDK release. #139

Closed budgester closed 7 years ago

budgester commented 7 years ago

martinstev-ltm1:~ martin.stevens$ knife rackspace server create --server-name MSTEST -f 3 -I f2db6fd7-1e40-41f1-9ac0-ad8d1dfd7651

ERROR: Fog::Compute::RackspaceV2::InternalServerError: [HTTP 500 | req-5747fc8f-4a32-4724-9d5b-2ae2ef5df32d] The server has either erred or is incapable of performing the requested operation.

jjasghar commented 7 years ago

can you run this with debugging on?

budgester commented 7 years ago
knife rackspace server create -f 3 -I f2db6fd7-1e40-41f1-9ac0-ad8d1dfd7651 -VV
INFO: Using configuration from /Users/martin.stevens/.chef/knife.rb
DEBUG: version  (config)
DEBUG: version v2 (cli)
DEBUG: rackspace_api_key ***** (config)
DEBUG: rackspace_api_key ***** (cli)
DEBUG: rackspace_username  (config)
DEBUG: rackspace_username  (cli)
DEBUG: rackspace_api_username *****(config)
DEBUG: rackspace_api_username  (cli)
DEBUG: rackspace_auth_url  (config)
DEBUG: rackspace_auth_url  (cli)
DEBUG: rackspace_auth_url https://identity.api.rackspacecloud.com/v2.0 (using)
DEBUG: rackspace_region LON (config)
DEBUG: rackspace_region LON (cli)
DEBUG: rackspace v2
DEBUG: https_proxy <not specified> (config)
DEBUG: http_proxy <not specified> (config)
DEBUG: using proxy <none> (config)
DEBUG: ssl_verify_peer <not specified> (config)
DEBUG: version  (config)
DEBUG: version v2 (cli)
DEBUG: rackspace_api_key ****** (config)
DEBUG: rackspace_api_key ***** (cli)
DEBUG: rackspace_username  (config)
DEBUG: rackspace_username  (cli)
DEBUG: rackspace_api_username ***** (config)
DEBUG: rackspace_api_username  (cli)
DEBUG: rackspace_auth_url  (config)
DEBUG: rackspace_auth_url  (cli)
DEBUG: rackspace_auth_url https://identity.api.rackspacecloud.com/v2.0 (using)
DEBUG: rackspace_region LON (config)
DEBUG: rackspace_region LON (cli)
DEBUG: rackspace v2
DEBUG: version  (config)
DEBUG: version v2 (cli)
DEBUG: rackspace_api_key ****** (config)
DEBUG: rackspace_api_key ****** (cli)
DEBUG: rackspace_username  (config)
DEBUG: rackspace_username  (cli)
DEBUG: rackspace_api_username ****** (config)
DEBUG: rackspace_api_username  (cli)
DEBUG: rackspace_auth_url  (config)
DEBUG: rackspace_auth_url  (cli)
DEBUG: rackspace_auth_url https://identity.api.rackspacecloud.com/v2.0 (using)
DEBUG: rackspace_region LON (config)
DEBUG: rackspace_region LON (cli)
DEBUG: rackspace v2
/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/excon-0.54.0/lib/excon/middlewares/expects.rb:7:in `response_call': [HTTP 500 | req-af703276-d6a3-4970-bec5-102e2c7cfa2a] The server has either erred or is incapable of performing the requested operation. (Fog::Compute::RackspaceV2::InternalServerError)
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/excon-0.54.0/lib/excon/middlewares/response_parser.rb:9:in `response_call'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/excon-0.54.0/lib/excon/connection.rb:388:in `response'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/excon-0.54.0/lib/excon/connection.rb:252:in `request'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/fog-core-1.43.0/lib/fog/core/connection.rb:81:in `request'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/fog-rackspace-0.1.4/lib/fog/rackspace/service.rb:42:in `request'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/fog-rackspace-0.1.4/lib/fog/rackspace/compute_v2.rb:166:in `request'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/fog-rackspace-0.1.4/lib/fog/rackspace/requests/compute_v2/create_server.rb:124:in `create_server'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/fog-rackspace-0.1.4/lib/fog/rackspace/models/compute_v2/server.rb:274:in `create'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/fog-rackspace-0.1.4/lib/fog/rackspace/models/compute_v2/server.rb:232:in `save'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/knife-rackspace-1.0.2/lib/chef/knife/rackspace_server_create.rb:439:in `run'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31/lib/chef/knife.rb:443:in `block in run_with_pretty_exceptions'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31/lib/chef/local_mode.rb:44:in `with_server_connectivity'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31/lib/chef/knife.rb:442:in `run_with_pretty_exceptions'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31/lib/chef/knife.rb:219:in `run'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31/lib/chef/application/knife.rb:156:in `run'
    from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31/bin/knife:25:in `<top (required)>'
    from /usr/local/bin/knife:57:in `load'
    from /usr/local/bin/knife:57:in `<main>'
martinb3 commented 7 years ago

I noticed you've got knife-rackspace 1.0.2, but we haven't released a 1.0.2 version yet -- that seems a bit odd. It seems like I can reproduce the issue between 0.11.0 and 0.11.1 of knife-rackspace, using the latest chef gem, so I've tracked it down to that difference. I won't have a ton of free cycles to debug this further but I'll assign the issue to me so I can chase it later unless someone else wants to pick it up before then. /CC @jjasghar

msommerville commented 7 years ago

I came across this thread because I encountered exactly this issue using fog directly. I have a working version on my laptop and a non-working version on a VM, so I'll work through the differences in versions and I'll post anything I find that I think will be of use here.

msommerville commented 7 years ago

The problem appears to be a change between fog-rackspace 0.1.12 and 0.1.13. I have raised a bug for it ( https://github.com/fog/fog-rackspace/issues/23 ). In the meantime, as a workaround, simply downgrading the fog-rackspace gem to version 0.1.12 worked for me. Good Luck.

jcsalterego commented 7 years ago

The problem appears to be a change between fog-rackspace 0.1.12 and 0.1.13

@msommerville Should that be 0.1.2 and 0.1.3? I don't see the versions you mention on https://rubygems.org/gems/fog-rackspace/versions

msommerville commented 7 years ago

Yes, it should - sorry.

cswingler commented 7 years ago

This bug has been open for a rather long time - is a fix coming to ChefDK, or will the stable release (which doesn't work for us because of this bug) be yanked? This is an outright blocker for Rackspace Cloud users.

trappar commented 7 years ago

Also hitting this bug. Not sure what to do...

jcsalterego commented 7 years ago

@trappar: I've had good luck downgrading fog-rackspace to 0.1.2 per @msommerville's suggestion.

martinb3 commented 7 years ago

/CC @mdarby too, since he was looking at fog-rackspace and the issue filed there.

mdarby commented 7 years ago

Seems this is the offender: https://github.com/fog/fog-rackspace/commit/e41257fcb5aff3ef6fba72be70dec6614c4eafe8#diff-6c806c7bcc47991b339f88323d854897

I reverted that commit and pushed 0.1.5 here locally. Would someone care to test :master against their Chef/etc routines?

jcsalterego commented 7 years ago

Thanks @mdarby! https://github.com/fog/fog-rackspace/issues/23 seems to have done the trick.

For anyone else following along, my method for testing was to manually install the gem before and after the fix:

$ cd fog-rackspace
$ git checkout 575a93c6e08379b23bad8e2155497b36d990c119
$ /opt/chefdk/embedded/bin/gem build fog-rackspace.gemspec 
$ /opt/chefdk/embedded/bin/gem install fog-rackspace-0.1.3.gem 
$ /opt/chefdk/embedded/bin/knife server create # ...
# failure
$ cd fog-rackspace
$ git checkout master
$ /opt/chefdk/embedded/bin/gem build fog-rackspace.gemspec 
$ /opt/chefdk/embedded/bin/gem install fog-rackspace-0.1.5.gem 
$ /opt/chefdk/embedded/bin/knife server create # ...
# success
mdarby commented 7 years ago

I will push fog-rackspace 0.1.5 later today unless we see some fail cases.

mdarby commented 7 years ago

Successfully registered gem: fog-rackspace (0.1.5)

martinb3 commented 7 years ago

Thanks @mdarby! All, I've released v1.0.4 of knife-rackspace, which has the fog-rackspace dependency pinned to be the new, fixed fog-rackspace release. Thanks for the help everyone!

jcsalterego commented 7 years ago

Thanks @martinb3!