Skip to content
Browse files

ec2::machine: increasing wait interval, to reduce potential for inter…

…mittent errors to bomb run
  • Loading branch information...
1 parent 5148dca commit 921314398012c70715756b5bfe9c5cf4074c1efd @temujin9 temujin9 committed Feb 14, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/ironfan/provider/ec2/machine.rb
View
8 lib/ironfan/provider/ec2/machine.rb
@@ -161,7 +161,13 @@ def self.create!(computer)
computer.machine = machine
remember machine, :id => computer.name
- fog_server.wait_for { ready? }
+ # AWS sometimes takes too long to respond for this block's liking.
+ # Expand its wait interval, so that it doesn't just bomb out
+ # after three quick failures in succession.
+ # For more info, see:
+ # - http://rubydoc.info/gems/fog/1.9.0/Fog/Model#wait_for-instance_method
+ # - https://github.com/fog/fog/blob/master/lib/fog/core/wait_for.rb
+ fog_server.wait_for(Fog.timeout, 5) { ready? }
end
# tag the computer correctly

0 comments on commit 9213143

Please sign in to comment.
Something went wrong with that request. Please try again.