[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH] on metadata import, avoid pinning VMs to particular hosts simply because of a physical CD



# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1270637162 -3600
# Node ID e80cc42b227116e59498beb8985fa7f198f307ef
# Parent  3884cd6ef7f0fa9e2a5377520e641d53c8b25878
CA-19067 - Now only matching CD drive contents with non-udev ISO VDIs. This 
rules out matching local drives.

Original patch was by Vijay Raghavan <vijay@xxxxxxxxxxxxx>

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

diff -r 3884cd6ef7f0 -r e80cc42b2271 ocaml/xapi/import.ml
--- a/ocaml/xapi/import.ml      Wed Apr 07 11:43:55 2010 +0100
+++ b/ocaml/xapi/import.ml      Wed Apr 07 11:46:02 2010 +0100
@@ -323,8 +323,9 @@
 
   let original_sr = API.From.sR_t "" (find_in_export (Ref.string_of 
vdi_record.API.vDI_SR) state.export) in
   if original_sr.API.sR_content_type = "iso" then begin
-    (* Best effort: locate a VDI in any ISO SR with a matching VDI.location *)
-    let iso_srs = List.filter (fun self -> Client.SR.get_content_type rpc 
session_id self = "iso")
+    (* Best effort: locate a VDI in any shared ISO SR with a matching 
VDI.location *)
+    let iso_srs = List.filter (fun self -> Client.SR.get_content_type rpc 
session_id self = "iso"
+        && Client.SR.get_type rpc session_id self <> "udev")
       (Client.SR.get_all rpc session_id) in
     match List.filter (fun (_, vdir) -> 
        vdir.API.vDI_location = vdi_record.API.vDI_location && (List.mem 
vdir.API.vDI_SR iso_srs))
1 file changed, 3 insertions(+), 2 deletions(-)
ocaml/xapi/import.ml |    5 +++--


Attachment: CA-19067-imported-vm-pinned-to-host.patch
Description: Text Data

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.