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.
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.
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.