diff mbox

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

Message ID 108acc5d4cc9bbae76b52787a0ff61ecc0dd0785.1461531451.git.crobinso@redhat.com
State New
Headers show

Commit Message

Cole Robinson April 24, 2016, 8:58 p.m. UTC
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(-)

-- 
2.7.3

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

Comments

Cole Robinson April 25, 2016, 1:13 p.m. UTC | #1
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

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

Patch

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,