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 05 of 11] CA-35165: Remove a spurious excxeption when r

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 05 of 11] CA-35165: Remove a spurious excxeption when refreshing VM_guest_metrics when the VM_guest_metrics doesn't exist (ie for dom0)
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Mon, 30 Nov 2009 15:40:57 +0000
Delivery-date: Mon, 30 Nov 2009 07:40:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1259595652@xxxxxxxxxxxxxxxxxxxx>
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 David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1259595423 0
# Node ID b7ea5ea562e0a28e01736cbf7b7fc4b20f2f579d
# Parent  968a9c3b6d3cabb434a4d6252c1caabe0edb78e8
CA-35165: Remove a spurious excxeption when refreshing VM_guest_metrics when 
the VM_guest_metrics doesn't exist (ie for dom0)

Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>

diff -r 968a9c3b6d3c -r b7ea5ea562e0 ocaml/xapi/xapi_guest_agent.ml
--- a/ocaml/xapi/xapi_guest_agent.ml    Mon Nov 30 15:37:03 2009 +0000
+++ b/ocaml/xapi/xapi_guest_agent.ml    Mon Nov 30 15:37:03 2009 +0000
@@ -126,7 +126,9 @@
     with _ -> 
       (* Make sure our cached idea of whether the domain is live or not is 
correct *)
       let vm_guest_metrics = Db.VM.get_guest_metrics ~__context ~self in
-      let live = try Db.VM_guest_metrics.get_live ~__context 
~self:vm_guest_metrics with _ -> false in
+         let live = true
+               && Db.is_valid_ref vm_guest_metrics 
+               && Db.VM_guest_metrics.get_live ~__context 
~self:vm_guest_metrics in
       if live then
        dead_domains := IntSet.remove domid !dead_domains
       else
1 file changed, 3 insertions(+), 1 deletion(-)
ocaml/xapi/xapi_guest_agent.ml |    4 +++-


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

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>