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 3 of 3] [mq]: xapi-report-the-window-error-code-on-snap

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 3 of 3] [mq]: xapi-report-the-window-error-code-on-snapshot-with-quiesce-errors
From: Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx>
Date: Tue, 8 Dec 2009 15:57:55 +0000
Delivery-date: Tue, 08 Dec 2009 07:56:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1260287872@steel>
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 Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx>
# Date 1260287268 0
# Node ID 4b50a8760edaeb233407dad9c510649bca0b703b
# Parent  1bddd966816481a5f7e240d73b0cb903c8f6c8fc
[mq]: xapi-report-the-window-error-code-on-snapshot-with-quiesce-errors

diff -r 1bddd9668164 -r 4b50a8760eda ocaml/xapi/xapi_vm_snapshot.ml
--- a/ocaml/xapi/xapi_vm_snapshot.ml    Tue Dec 08 15:43:39 2009 +0000
+++ b/ocaml/xapi/xapi_vm_snapshot.ml    Tue Dec 08 15:47:48 2009 +0000
@@ -107,6 +107,7 @@
        | "snapshot-error" ->
                (* If an error was occured we get the error type and return *)
                let error_str = xs.Xs.read (snapshot_path ~xs ~domid "error") in
+               let error_code () = try xs.Xs.read (snapshot_path ~xs ~domid 
"error/code") with _ -> "0" in
                error "wait_for_snapshot: %s" error_str;
                if List.mem error_str [
                        Api_errors.xen_vss_req_error_init_failed;
@@ -117,7 +118,7 @@
                        Api_errors.xen_vss_req_error_preparing_writers;
                        Api_errors.xen_vss_req_error_creating_snapshot;
                        
Api_errors.xen_vss_req_error_creating_snapshot_xml_string ]
-               then raise (Api_errors.Server_error (error_str, [ Ref.string_of 
vm ]))
+               then raise (Api_errors.Server_error (error_str, [ Ref.string_of 
vm; error_code () ]))
                else raise (Api_errors.Server_error 
(Api_errors.vm_snapshot_with_quiesce_failed, [ Ref.string_of vm; error_str ]))
 
        | e -> 
1 file changed, 2 insertions(+), 1 deletion(-)
ocaml/xapi/xapi_vm_snapshot.ml |    3 ++-


Attachment: xen-api.hg-3.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>