[libvirt] [PATCH 2/2] daemon: stream: Don't log error when client aborts

Cole Robinson crobinso at redhat.com
Mon Apr 25 13:13:28 UTC 2016


On 04/24/2016 04:58 PM, Cole Robinson wrote:
> Every time a client aborts a stream via the virStreamAbort API,
> the daemon always logs an error like:
> 
>   error : daemonStreamHandleAbort:617 : stream aborted at client request
> 
> For example, this message is logged any time the user disconnects from
> 'virsh console'. However this isn't really an error condition, and instead
> the result of a successful RPC call to abort the stream.
> 
> Downgrade the message to VIR_INFO
> ---
>  daemon/stream.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/daemon/stream.c b/daemon/stream.c
> index c892dcb..d2f85ad 100644
> --- a/daemon/stream.c
> +++ b/daemon/stream.c
> @@ -613,8 +613,7 @@ daemonStreamHandleAbort(virNetServerClientPtr client,
>      virStreamAbort(stream->st);
>  
>      if (msg->header.status == VIR_NET_ERROR) {
> -        virReportError(VIR_ERR_RPC,
> -                       "%s", _("stream aborted at client request"));
> +        VIR_INFO("stream aborted at client request");
>      } else {
>          VIR_WARN("unexpected stream status %d", msg->header.status);
>          virReportError(VIR_ERR_RPC,
> 

This isn't complete, that error message is expected to bubble up to the
client, and just switching it to VIR_INFO isn't sufficient. I'll send a v2

- Cole




More information about the libvir-list mailing list