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] consider host liveness when forwarding VDI.copy

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] consider host liveness when forwarding VDI.copy
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Tue, 9 Feb 2010 11:49:40 +0000
Delivery-date: Tue, 09 Feb 2010 03:42:08 -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 1265716153 0
# Node ID 505385179bff8c6a9bddc032436f8601b067a342
# Parent  5f0f093c3dd3f44003c640e36af1469888441e39
CA-22016: when deciding which host to forward a VDI.copy to (eg when installing 
a VM to a different SR), take into account the host liveness.

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

diff -r 5f0f093c3dd3 -r 505385179bff ocaml/xapi/message_forwarding.ml
--- a/ocaml/xapi/message_forwarding.ml  Tue Feb 02 15:52:34 2010 +0000
+++ b/ocaml/xapi/message_forwarding.ml  Tue Feb 09 11:49:13 2010 +0000
@@ -2458,10 +2458,11 @@
     let forward_sr_multiple_op ~local_fn ~__context ~srs op =
       let hosts = Db.Host.get_all ~__context in
       let filterfn host =
-       try
-         Xapi_vm_helpers.assert_can_see_specified_SRs ~__context ~reqd_srs:srs 
~host;
-         true
-       with 
+               try
+                       Xapi_vm_helpers.assert_can_see_specified_SRs ~__context 
~reqd_srs:srs ~host;
+                       check_live ~__context host;
+                       true
+               with 
            _ -> false in
       let possibles = List.filter filterfn hosts in
       match possibles with
1 file changed, 5 insertions(+), 4 deletions(-)
ocaml/xapi/message_forwarding.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] consider host liveness when forwarding VDI.copy, David Scott <=