Vagrant Rackspace HTTP 413 Personality file content too long

23 views
Skip to first unread message

Nathan Nobbe

unread,
May 7, 2014, 3:52:47 PM5/7/14
to vagra...@googlegroups.com

Hi gang,

I'm starting to try vagrant/rackspace integration and running into trouble specifying a custom SSH keypair or perhaps have encountered a new bug in the Rackspace API. Can you take a look?

Works without custom SSH-keypair

Trying to get going with Vagrant and Rackspace, I was able to spool up a box with the dummy .box file and insecure Vagrant keys, following these instructions.

Vagrant.configure("2") do |config|
  #----------
  # config.vm
  #----------
  config.vm.box     = "dummy"
  config.vm.box_url = "https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box"

  #------------------
  # config rackspace
  #------------------
  config.vm.provider :rackspace do |rs|
    rs.username         = "xxxxxx"
    rs.api_key          = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    rs.flavor           = "1 GB Performance"
    rs.image            = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    rs.rackspace_region = "dfw"
    rs.server_name      = "test-vagrant"
  end
end

Broken with custom SSH-keypair

Trying to then specify a keypair with the following configuration

Vagrant.configure("2") do |config|
  #----------
  # config.vm
  #----------
  config.vm.box     = "dummy"
  config.vm.box_url = "https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box"

  #-----------
  # config.ssh
  #-----------
  config.ssh.private_key_path = "/Users/natedogg/.ssh/id_rsa"

  #------------------
  # config rackspace
  #------------------
  config.vm.provider :rackspace do |rs|
    rs.username         = "xxxxxx"
    rs.api_key          = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    rs.flavor           = "1 GB Performance"
    rs.image            = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    rs.rackspace_region = "dfw"
    rs.server_name      = "test-vagrant"
    rs.public_key_path  = "/Users/natedogg/.ssh/id_rsa.pub"
  end
end

vagrant up --provider=rackspace results in an HTTP 413 from Rackspace.

~/.vagrant.d/gems/gems/excon-0.31.0/lib/excon/middlewares/expects.rb:6:in `response_call': [HTTP 413 | ] Personality file content too long (Fog::Compute::RackspaceV2::ServiceError)

Have Tried

  • Different rs.flavor (512MB Standard Instance)
  • Different installations of Vagrant
Seems like this would be a common problem since insecure keys would be bad on a Rackspace box.

thanks,

-nathan

Nathan Nobbe

unread,
May 7, 2014, 6:04:16 PM5/7/14
to vagra...@googlegroups.com
I got this working per this answer:

There is a maximum filesize that you're allowed to provide when you're injecting "personality" files onto a newly launched server, which you can find from the limits endpoint. Unfortunately, I don't see an easy way to query that from Vagrant, but I'd expect that's what you're hitting. Mine is 1000 bytes!

What I'd recommend instead is to upload your public key as a named keypair -- which you can do through the web UI or the API -- and give Vagrant the keypair name:

config.vm.provider :rackspace do |rs|
  rs.username         = "xxxxxx"
  rs.api_key          = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  rs.flavor           = "1 GB Performance"
  rs.image            = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  rs.rackspace_region = "dfw"
  rs.server_name      = "test-vagrant"
  rs.key_name         = "mykey"
end


--
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/pvAejBv5Cjg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages