WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 2 of 3] [mq]: xenstore-do-not-log-enoent

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 2 of 3] [mq]: xenstore-do-not-log-enoent
From: Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx>
Date: Wed, 9 Dec 2009 11:16:20 +0000
Delivery-date: Wed, 09 Dec 2009 03:13:35 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1260357378@steel>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx>
# Date 1260356736 0
# Node ID b8fefebee7bf9a9127b67af37e68741e72c35919
# Parent  5f26cdb61a6b90a1c4e8da3126ae6f01b1de7c44
[mq]: xenstore-do-not-log-enoent

diff -r 5f26cdb61a6b -r b8fefebee7bf ocaml/xenstored/logging.ml
--- a/ocaml/xenstored/logging.ml        Wed Dec 09 10:52:47 2009 +0000
+++ b/ocaml/xenstored/logging.ml        Wed Dec 09 11:05:36 2009 +0000
@@ -222,9 +222,12 @@
        if !log_transaction_ops && tid <> 0
        then write_access_log ~tid ~con (XbOp Xb.Op.Transaction_end)
 
+let is_error_kind kind data =
+       Stringext.String.startswith kind data
+
 let xb_answer ~tid ~con ~ty data =
        let print = match ty with
-               | Xb.Op.Error when data="ENOENT " -> !log_read_ops
+               | Xb.Op.Error when is_error_kind data "ENOENT" -> !log_read_ops
                | Xb.Op.Error -> !log_special_ops
                | Xb.Op.Watchevent -> true
                | _ -> false
1 file changed, 4 insertions(+), 1 deletion(-)
ocaml/xenstored/logging.ml |    5 ++++-


Attachment: xen-api.hg-3.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api