mitchellh / vagrant-rackspace

Use Vagrant to manage Rackspace Cloud instances.
MIT License
236 stars 155 forks source link

vagrant-rackspace server error Fog::Compute::RackspaceV2::InternalServerError #147

Closed noeliaoses closed 8 years ago

noeliaoses commented 8 years ago

Hi,

I have a simple vagrantfile that used to work:

# Defines our Vagrant environment
#
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.ssh.private_key_path = "~/.ssh/id_rsa_private_key" 
  config.vm.provider :rackspace do |rs|
    rs.username         = "myusername"
    rs.api_key          = "myapikey"
    rs.flavor           = /512MB/
    rs.image            = /Ubuntu/
    rs.rackspace_region = :lon
    rs.server_name      = "test-dummy"
    rs.key_name         = "ssh_rda_public_key"
  end
end

It used to work but now I get the following error:

noses@CPU00265U:~/Documents/PROJECTS/DEPLOYMENT/2_rackspace_SIMPLE$ vagrant up --provider=rackspace
Bringing machine 'default' up with 'rackspace' provider...
==> default: Finding flavor for server...
==> default: Finding image for server...
==> default: Launching a server with the following settings...
==> default:  -- Flavor: 512MB Standard Instance
==> default:  -- Image: OnMetal - Ubuntu 15.10 (Wily)
==> default:  -- Name: test-dummy
==> default:  -- Key Name: ssh_rda_public_key
/home/noses/.vagrant.d/gems/gems/excon-0.48.0/lib/excon/middlewares/expects.rb:6:in `response_call': [HTTP 500 | req-2f7f7570-a73c-404e-a511-24c202360098] The server has either erred or is incapable of performing the requested operation. (Fog::Compute::RackspaceV2::InternalServerError)
    from /home/noses/.vagrant.d/gems/gems/excon-0.48.0/lib/excon/middlewares/response_parser.rb:8:in `response_call'
    from /home/noses/.vagrant.d/gems/gems/excon-0.48.0/lib/excon/connection.rb:389:in `response'
    from /home/noses/.vagrant.d/gems/gems/excon-0.48.0/lib/excon/connection.rb:253:in `request'
    from /home/noses/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/connection.rb:81:in `request'
    from /home/noses/.vagrant.d/gems/gems/fog-1.37.0/lib/fog/rackspace/service.rb:42:in `request'
    from /home/noses/.vagrant.d/gems/gems/fog-1.37.0/lib/fog/rackspace/compute_v2.rb:164:in `request'
    from /home/noses/.vagrant.d/gems/gems/fog-1.37.0/lib/fog/rackspace/requests/compute_v2/create_server.rb:124:in `create_server'
    from /home/noses/.vagrant.d/gems/gems/fog-1.37.0/lib/fog/rackspace/models/compute_v2/server.rb:278:in `create'
    from /home/noses/.vagrant.d/gems/gems/fog-1.37.0/lib/fog/rackspace/models/compute_v2/server.rb:232:in `save'
    from /home/noses/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/collection.rb:51:in `create'
    from /home/noses/.vagrant.d/gems/gems/vagrant-rackspace-0.1.10/lib/vagrant-rackspace/action/create_server.rb:113:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/synced_folders.rb:86:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:80:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /home/noses/.vagrant.d/gems/gems/vagrant-rackspace-0.1.10/lib/vagrant-rackspace/action/connect_rackspace.rb:40:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:214:in `action_raw'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:191:in `block in action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:516:in `lock'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

What happened? I didn't change anything. How come it is not working any more? Any help will be much appreciated. @mitchellh @maxlinc @seanorama @elight @michaelsbradleyjr @mbarton @dr-strangecode @pikesley @cyli @DavidWittman @berendt @patcon @domcleal @emyl @viable-hartman @VMTrooper @Richtermeister @deanmalmgren @git-harry @avelis

Regards, Noelia

avelis commented 8 years ago

@noeliaoses I no longer use Rackspace at the moment.

At this point, all I can suggest is to check your ability to launch rackspace instances via the openstack command line.

noeliaoses commented 8 years ago

@avelis Thank you for the quick reply! Unfortunately, I've never used openstack and don't even know what it is and/or what it is for :( I guess I'll have to do some studying unless somebody else provides another solution...

derks commented 8 years ago

@noeliaoses I think the issue might be that your regex matching for the image is too loose. Your using /512MB/ for the flavor, which matches the 512MB Standard Instance, however using /Ubuntu/ for the image is wide open and is matching OnMetal - Ubuntu 15.10 (Wily) which isn't want you want (OnMetal == Bare Metal Servers). Maybe try something more specific like /Ubuntu 14.04 LTS/.

Might also help to know the following:

noeliaoses commented 8 years ago

@derks I tried using rs.flavor = /512MB Standard Instance/ and rs.image = /Ubuntu 14.04 LTS/, however I still get the same error.

My OS is Ubuntu 14.04 LTS. vagrant version 1.7.4. I don't know how to check the vagrant-rackspace version

Any other ideas would be very welcomed.

derks commented 8 years ago

You can get the plugin versions by: vagrant plugin list.

derks commented 8 years ago

@noeliaoses I was able to reproduce this using your example Vagrantfile, and using my Rackspace UK LON account. The issue was indeed with the regex on the image. Even using /Ubuntu 14.04 LTS/ matches an OnMetal image, which fails for obvious reasons.

I was able to resolve this issue by using the following image regex:

rs.image = /^Ubuntu 14.04 LTS/

Can you try that?

noeliaoses commented 8 years ago

@derks That worked!!!! Thank you very much. I had seen the OnMetal thing but did not understand what that meant.

My vagrant-rackspace version is 0.1.10, but I guess that doesn't matter now :)