Skip to content
Snippets Groups Projects
Commit 7adb7dff authored by Iustin Pop's avatar Iustin Pop
Browse files

Convert Luxi results to Ganeti errors


This a bit too complex patch converts the result of Luxi calls
(submitJob, query*, etc.) from Result to ErrorResult. It then
immediately revers this in the HTools/Backend/Luxi module, where we
don't need necessarily the full error type (just a nice error
message), and does the same in Hbal's job execution functions.

While at first sight this doesn't seem to do much, what we get is
actual error messages from Ganeti, plus improvements to the result
parsing: instead of "can't parse char", we now get properly (note,
wrapped manually):

  Executing jobset for instances instance1, …
  Job submission error: Failure: the job queue is marked for drain and
    doesn't accept new requests

Or:

  Job submission error: Unhandled exception: LuxiError "parsing job
    id: cannot parse string 'a956101'"

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 7939f60c
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment