# HG changeset patch # User David Scott # 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 Signed-off-by: David Scott 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))