Browse files

CA-48768: allow late cancellation of vm-import

Signed-off-by: Mike McClurg <>
  • Loading branch information...
1 parent dbd1565 commit 1439206f79316ee437ffe9640f96c9b91b1dd759 Mike McClurg committed Nov 7, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 ocaml/xapi/
@@ -1328,6 +1328,12 @@ let handler (req: Request.t) s _ =
List.iter (fun (extid, intid, size) -> debug "Expecting to import VDI %s into %s (size=%Ld)" extid (Ref.string_of intid) size) vdis;
let checksum_table = Stream_vdi.recv_all refresh_session s __context rpc session_id header.version force vdis in
+ (* CA-48768: Stream_vdi.recv_all only checks for task cancellation
+ every ten seconds, so we need to check again now. After this
+ point, we disable cancellation for this task. *)
+ TaskHelper.exn_if_cancelling ~__context;
+ TaskHelper.set_not_cancellable ~__context;
(* Pre-miami GA exports have a checksum table at the end of the export. Check the calculated checksums *)
(* against the table here. Nb. Rio GA-Miami B2 exports get their checksums checked twice! *)
if header.version.export_vsn < 2 then

0 comments on commit 1439206

Please sign in to comment.