Skip to content
  • Iustin Pop's avatar
    Convert Luxi results to Ganeti errors · 7adb7dff
    Iustin Pop authored
    
    
    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>
    7adb7dff