Netflix / aminator

A tool for creating EBS AMIs. This tool currently works for CentOS/RedHat Linux images and is intended to run on an EC2 instance.
Apache License 2.0
951 stars 170 forks source link

do some juggling to wrap the unmount call in a retry #269

Closed bmoyles closed 5 years ago

bmoyles commented 5 years ago

Inside umount, inspect the result and raise a new CommandException to trigger a retry. If we exhaust retries, the CommandException is still raised, so catch that in the caller and handle appropriately. Could probably do without the else: clauses in the try/except as a run w/o an exception should return a result where result.success == True, but kept it in as a sanity check/safeguard.

bmoyles commented 5 years ago

I also moved the call to busy_mount inside unmount when result.success != true which gives us a bit more debug output on every failed unmount command rather than just the top-level umount.