Skip to content

Commit

Permalink
spot: Waiting for spot request ready
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeken committed Oct 11, 2013
1 parent 34c8307 commit 86ff6b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/vagrant-aws/action/run_instance.rb
Expand Up @@ -177,6 +177,10 @@ def server_from_spot_request(env, config)
break if env[:interrupted]
spot_req = env[:aws_compute].describe_spot_instance_requests(
'spot-instance-request-id' => [spot_request_id]).body["spotInstanceRequestSet"].first

# waiting for spot request ready
next unless spot_req

# display something whenever the status code changes
if status_code != spot_req["fault"]["code"]
env[:ui].info("Status: #{spot_req["fault"]["message"]}")
Expand Down

0 comments on commit 86ff6b6

Please sign in to comment.