Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #79 from caktus/tolerate-pending-available-weirdness
Browse files Browse the repository at this point in the history
Remove an assert that image is availalbe...
  • Loading branch information
kmtracey committed Jun 29, 2018
2 parents 46dcf75 + 543bdb8 commit ad702d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fabulaws/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,11 @@ def create_image(self, replace_existing=False, name=None):
logger.info('Waiting for image to enter "available" state...')
while image.update() == 'pending':
time.sleep(2)
assert image.update() == 'available'
status = image.update()
while status != 'available':
logger.info('Unexpected image status after pending: %s...waiting a bit longer...', status)
time.sleep(2)
status = image.update()
logger.info('Image creation finished.')
return image

Expand Down

0 comments on commit ad702d1

Please sign in to comment.