Skip to content
  • Paolo Bonzini's avatar
    migration (outgoing): add error propagation for all protocols · f37afb5a
    Paolo Bonzini authored
    
    
    Error propagation is already there for socket backends.  Add it to other
    protocols, simplifying code that tests for errors that will never happen.
    With all protocols understanding Error, the code can be simplified
    further by removing the return value.
    
    Unfortunately, the quality of error messages varies depending
    on where the error is detected, because no Error is passed to the
    NonBlockingConnectHandler.  Thus, the exact error message still cannot
    be sent to the user if the OS reports it asynchronously via SO_ERROR.
    If NonBlockingConnectHandler received an Error**, we could for
    example report the error class and/or message via a new field of the
    query-migration command even if it is reported asynchronously.
    
    Before:
    
        (qemu) migrate fd:ffff
        migrate: An undefined error has occurred
        (qemu) info migrate
        (qemu)
    
    After:
    
        (qemu) migrate fd:ffff
        migrate: File descriptor named 'ffff' has not been found
        (qemu) info migrate
        capabilities: xbzrle: off
        Migration status: failed
        total time: 0 milliseconds
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    f37afb5a