Skip to content
  • Iustin Pop's avatar
    Improve handling of lost jobs · 91c622a8
    Iustin Pop authored
    
    
    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: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    91c622a8