Improve handling of lost jobs
Currently, if the cli.JobExecutor class is being used, and one of the jobs is being archived before it can check its result, it will raise a stracktrace as _ChooseJob is not prepared to handle this case. This case makes JobExecutor work better with lost jobs (it still reports them as 'failed', but it doesn't break and returns a proper error message), and modifies the generic FormatError to report the JobLost exception properly, instead of as "Unhandled Ganeti Exception". Since JobExecutor is hard to test properly, I only tested this manually, via a fake invocation. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
Loading
Please register or sign in to comment