* [PATCH 0 of 1] CA-38567: Catch I/O errors during VM.suspend
@ 2010-03-16 16:13 Daniel Stodden
2010-03-16 16:13 ` [PATCH 1 " Daniel Stodden
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Stodden @ 2010-03-16 16:13 UTC (permalink / raw)
To: Xen
Hi.
Yet another fd we'd rather like to sync down before closing.
Apologies if you receive this patch twice, but yesterday's apparently
didn't make it through.
Beware: Proposed patch adjusts exception handling in
VM.checkpoint. The previous version only did that for ENOSPC, the new
one would just pass through any known Api_error. This maybe wants some
additional review. Used to be Thomas's:
user: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
summary: CA-32738: improve the error message on checkpoint when there is not enough space to create the suspend image.
Thanks.
Daniel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1 of 1] CA-38567: Catch I/O errors during VM.suspend
2010-03-16 16:13 [PATCH 0 of 1] CA-38567: Catch I/O errors during VM.suspend Daniel Stodden
@ 2010-03-16 16:13 ` Daniel Stodden
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Stodden @ 2010-03-16 16:13 UTC (permalink / raw)
To: Xen
[-- Attachment #1: Type: text/plain, Size: 60 bytes --]
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
[-- Attachment #2: CA-38567-vm-suspend.diff --]
[-- Type: text/x-patch, Size: 1575 bytes --]
# HG changeset patch
# User Daniel Stodden <daniel.stodden@citrix.com>
# Date 1268753645 0
# Node ID 9a2390fece52d39d860247756a0ce300615fb209
# Parent 86257cf86017409b3c7e268f6950a6323bcdece7
CA-38567: Catch I/O errors during VM.suspend
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
diff -r 86257cf86017 -r 9a2390fece52 ocaml/xapi/vmops.ml
--- a/ocaml/xapi/vmops.ml Tue Mar 16 15:11:05 2010 +0000
+++ b/ocaml/xapi/vmops.ml Tue Mar 16 15:34:05 2010 +0000
@@ -960,7 +960,13 @@
Db.VM.set_suspend_VDI ~__context ~self:vm
~value:vdi_ref;
)
- (fun () -> Unix.close fd);
+ (fun () ->
+ try
+ Unixext.fsync fd;
+ Unix.close fd
+ with Unix.Unix_error(Unix.EIO, _, _) ->
+ raise (Api_errors.Server_error (Api_errors.vdi_io_error, ["I/O error saving VM suspend image"]))
+ );
debug "suspend: complete");
debug "suspend phase 4/4: recording memory usage";
diff -r 86257cf86017 -r 9a2390fece52 ocaml/xapi/xapi_vm_snapshot.ml
--- a/ocaml/xapi/xapi_vm_snapshot.ml Tue Mar 16 15:11:05 2010 +0000
+++ b/ocaml/xapi/xapi_vm_snapshot.ml Tue Mar 16 15:34:05 2010 +0000
@@ -186,9 +186,7 @@
(* flush the devices *)
List.iter (Xapi_vbd.flush ~__context) vbds;
with
- | Api_errors.Server_error("SR_BACKEND_FAILURE_44", _) as e ->
- error "Not enough space to create the suspend image";
- raise e
+ | Api_errors.Server_error(_, _) as e -> raise e
| _ -> raise (Api_errors.Server_error (Api_errors.vm_checkpoint_suspend_failed, [Ref.string_of vm]))
end;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-16 16:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-16 16:13 [PATCH 0 of 1] CA-38567: Catch I/O errors during VM.suspend Daniel Stodden
2010-03-16 16:13 ` [PATCH 1 " Daniel Stodden
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).