Improve handling of lost jobs
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 <acf83a5274f31a43af6b914614365999469c1a31@google.com>
Reviewed-by: Guido Trotter <f62ca4d5358bdaeef0e50e57f9f7e231de63727e@google.com>

ganeti/ganeti,apyrgio/ganeti,mbakke/ganeti,leshchevds/ganeti,dimara/ganeti,yiannist/ganeti,yiannist/ganeti,apyrgio/ganeti,andir/ganeti,leshchevds/ganeti,mbakke/ganeti,yiannist/ganeti,grnet/snf-ganeti,ganeti-github-testing/ganeti-test-1,dimara/ganeti,apyrgio/snf-ganeti,bitemyapp/ganeti,ganeti-github-testing/ganeti-test-1,leshchevds/ganeti,ganeti/ganeti,bitemyapp/ganeti,onponomarev/ganeti,andir/ganeti,mbakke/ganeti,ganeti/ganeti,onponomarev/ganeti,grnet/snf-ganeti,apyrgio/snf-ganeti,andir/ganeti