Re: [PATCH] Fix error reporting when poll returns POLLHUP/POLLERR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 04/18/2017 12:05 PM, Daniel P. Berrange wrote:
> In the RPC client event loop code, if poll() returns only a POLLHUP
> or POLLERR status, then we end up reporting a bogus error message:
> 
>   error: failed to connect to the hypervisor
>   error: An error occurred, but the cause is unknown
> 
> We do actually report an error, but we virNetClientMarkClose method
> has already captured the error status before we report it, so the
> real error gets thrown away. The key fix is to report the error
> before calling virNetClientMarkClose(). In changing this, we also
> split out reporting of POLLHUP vs POLLERR to make any future bugs
> easier to diagnose.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/rpc/virnetclient.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 

ACK

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux