1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Fixed server bootstrap to remove default image if a boot disk is specified

This commit is contained in:
jordangbull 2013-07-11 18:40:40 -07:00
parent d1cedb9ca2
commit a7eec9b1e9
2 changed files with 6 additions and 1 deletions

View file

@ -138,7 +138,7 @@ module Fog
end
def backoff_if_unfound(&block)
retries_remaining = 5
retries_remaining = 10
begin
result = block.call
rescue Exception => msg

View file

@ -51,6 +51,11 @@ module Fog
:public_key_path => File.expand_path("~/.ssh/id_rsa.pub"),
:username => ENV['USER'],
}
if new_attributes[:disks]
new_attributes[:disks].each do |disk|
defaults.delete :image_name if disk['boot']
end
end
server = create(defaults.merge(new_attributes))
server.wait_for { sshable? }