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:
parent
d1cedb9ca2
commit
a7eec9b1e9
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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? }
|
||||
|
|
Loading…
Reference in a new issue