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] on metadata import, avoid pinning VMs to particular ho

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] on metadata import, avoid pinning VMs to particular hosts simply because of a physical CD
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Wed, 7 Apr 2010 11:48:07 +0100
Delivery-date: Wed, 07 Apr 2010 03:45:03 -0700
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 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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] on metadata import, avoid pinning VMs to particular hosts simply because of a physical CD, David Scott <=