Você pode se beneficiar desse patch, que deve registrar a má resposta real: link
Eu estou tentando automatizar o teste de aceitação usando vagrant para trazer máquinas com o serviço EC2 da amazon, então eu adicionei a caixa fictícia e copiei o Vagrantfile off Github , mas quando tento executar vagrant up --provider=aws
, obtenho a saída abaixo:
Eu sou relativamente novo em Ruby e por isso não sei exatamente o que está errado.
Trazendo a máquina 'default' para cima com o provedor 'aws' ...
[default] Warning! The AWS provider doesn't support any of the Vagrant
high-level network configurations (config.vm.network
). They
will be silently ignored.
[default] Launching an instance with the following settings...
[default] -- Type: m1.small
[default] -- AMI: ami-5344d263
[default] -- Region: us-east-1
[default] -- Keypair: vagrant-keypair
/home/vagrant/.vagrant.d/gems/gems/excon-0.25.0/lib/excon/middlewares/expects.rb:10:inresponse_call': Expected(200) <=> Actual(400 Bad Request) (Excon::Errors::BadRequest) from /home/vagrant/.vagrant.d/gems/gems/excon-0.25.0/lib/excon/connection.rb:353:in
response' from /home/vagrant/.vagrant.d/gems/gems/excon-0.25.0/lib/excon/connection.rb:247:inrequest' from /home/vagrant/.vagrant.d/gems/gems/fog-1.10.1/lib/fog/core/connection.rb:21:in
request' from /home/vagrant/.vagrant.d/gems/gems/fog-1.10.1/lib/fog/aws/compute.rb:384:in_request' from /home/vagrant/.vagrant.d/gems/gems/fog-1.10.1/lib/fog/aws/compute.rb:379:in
request' from /home/vagrant/.vagrant.d/gems/gems/fog-1.10.1/lib/fog/aws/requests/compute/run_instances.rb:119:inrun_instances' from /home/vagrant/.vagrant.d/gems/gems/fog-1.10.1/lib/fog/aws/models/compute/server.rb:173:in
save' from /home/vagrant/.vagrant.d/gems/gems/fog-1.10.1/lib/fog/core/collection.rb:52:increate' from /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.2.2/lib/vagrant-aws/action/run_instance.rb:76:in
call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:incall' from /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.2.2/lib/vagrant-aws/action/warn_networks.rb:14:in
call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:incall' from /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.2.2/lib/vagrant-aws/action/sync_folders.rb:21:in
call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/provision.rb:45:in
call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in
block in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:inbusy' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in
run' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in
call' from /home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.2.2/lib/vagrant-aws/action/connect_aws.rb:41:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in
call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/config_validate.rb:25:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in
call' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in
block in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:inbusy' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in
run' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/machine.rb:147:inaction' from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/batch_action.rb:63:in
block (2 levels) in run'
Erro ao executar após a recompilação:
Ocorreu um erro ao executar várias ações em paralelo. Quaisquer erros ocorridos são mostrados abaixo.
An unexpected error ocurred when executing the action on the
'default' machine. Please report this as a bug:
undefined method 'Errors' for Excon:Module
/home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.3.0.dev/lib/vagrant-aws/action/run_instance.rb:91:in 'rescue in call'
/home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.3.0.dev/lib/vagrant-aws/action/run_instance.rb:61:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in 'call'
/home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.3.0.dev/lib/vagrant-aws/action/warn_networks.rb:14:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in 'call'
/home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.3.0.dev/lib/vagrant-aws/action/sync_folders.rb:21:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/provision.rb:45:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in 'block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in 'busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in 'run'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in 'call'
/home/vagrant/.vagrant.d/gems/gems/vagrant-aws-0.3.0.dev/lib/vagrant-aws/action/connect_aws.rb:41:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/config_validate.rb:25:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/handle_box_url.rb:72:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:in 'call'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in 'block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in 'busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in 'run'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/machine.rb:147:in 'action'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/batch_action.rb:63:in 'block (2 levels) in run'
Você pode se beneficiar desse patch, que deve registrar a má resposta real: link
Isso pode estar relacionado a uma ami incorreta para a região # 101 .
Isso foi corrigido no recente vagrant-aws
, então atualize suas gems via:
vagrant plugin update
ou aplique o patch da solicitação de pull seguindo as etapas abaixo:
cd ~/.vagrant.d/gems/gems/vagrant-aws-*/
patch -p1 <(curl https://patch-diff.githubusercontent.com/raw/mitchellh/vagrant-aws/pull/101.patch)