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] Refresh VM_guest_metrics objects when xapi restarts

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] Refresh VM_guest_metrics objects when xapi restarts
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Wed, 4 Nov 2009 21:29:41 +0000
Delivery-date: Wed, 04 Nov 2009 13:26:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 1257369764 0
# Node ID 55113722d48c9029add5ca584f400836a4088896
# Parent  1224932ff7ea4a8099ea5a48a7c7a2cc1d2a2e76
Refresh the VM_guest_metrics objects when xapi restarts.

This is important because:
1. if we add an updated tools .iso containing new guest PV drivers (say, as the 
result of a software update) then we wish to recompute the 
PV-drivers-up-to-date flag to signal that guests need updating
2. if we were offline then we may have missed arbitrary guest agent updates 
anyway

Without this, stale information can persist for quite a long time, especially 
since guest agents tend to suppress redundant updates.

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

diff -r 1224932ff7ea -r 55113722d48c ocaml/xapi/dbsync_slave.ml
--- a/ocaml/xapi/dbsync_slave.ml        Tue Nov 03 16:58:38 2009 +0000
+++ b/ocaml/xapi/dbsync_slave.ml        Wed Nov 04 21:22:44 2009 +0000
@@ -440,9 +440,14 @@
        set_db_state_and_domid vmref state dinfo.Xc.domid;
       end;
     (* Now sync devices *)
-      debug "syncing devices and registering vm for monitoring: %s" 
(uuid_from_dinfo dinfo);
-      let uuid = Uuid.uuid_of_int_array dinfo.Xc.handle in
+    debug "syncing devices and registering vm for monitoring: %s" 
(uuid_from_dinfo dinfo);
+    let uuid = Uuid.uuid_of_int_array dinfo.Xc.handle in
        sync_devices dinfo;
+       (* Update the VM's guest metrics since: (i) while we were offline we may
+          have missed an update; and (ii) if the tools .iso has been updated 
then
+          we wish to re-evaluate whether we believe the VMs have up-to-date
+          tools *)
+       Events.callback_guest_agent xal dinfo.Xc.domid;
        (* Now register with monitoring thread *)
 
       Monitor_rrds.load_rrd ~__context (Uuid.to_string uuid) false
1 file changed, 7 insertions(+), 2 deletions(-)
ocaml/xapi/dbsync_slave.ml |    9 +++++++--


Attachment: xen-api.hg.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>
  • [Xen-API] [PATCH] Refresh VM_guest_metrics objects when xapi restarts, David Scott <=