• Pavel Emelyanov's avatar
    rpc: Report back first error message on failure · 6ae4a973
    Pavel Emelyanov authored
    When running criu in swrk mode the client typically wants to know
    the reason of failure. Right now criu reports back NOTHING but the
    fact that dump/restore/etc fails. We've tried to address this by
    introducing the cr-errno engine, but it doesn't seem to be informative
    enough and is hard to maintain -- adding new errno-s is boring :(
    
    I propose to report back the first message with ERROR level upon
    failrure as __typically__ the very first error message indicates
    that proceeding is impossible and criu rolls back (generating more
    error messages, so it's crucial to know the very first one).
    
    If we ever meet the situation that the first pr_err/pr_perror doesn't
    cause criu to exit, this printing should be fixed to be pr_warn.
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    Acked-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    6ae4a973
rpc.proto 4.16 KB