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 2 of 3] imported patch xapi-use-the-new-error-messages-

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 2 of 3] imported patch xapi-use-the-new-error-messages-for-snapshot-with-quiesce
From: Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx>
Date: Tue, 8 Dec 2009 15:57:54 +0000
Delivery-date: Tue, 08 Dec 2009 07:56:05 -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 1260287019 0
# Node ID 1bddd966816481a5f7e240d73b0cb903c8f6c8fc
# Parent  169c8b562c5668bdc73ca8510f6bc8399b580534
imported patch xapi-use-the-new-error-messages-for-snapshot-with-quiesce

diff -r 169c8b562c56 -r 1bddd9668164 ocaml/xapi/xapi_vm_snapshot.ml
--- a/ocaml/xapi/xapi_vm_snapshot.ml    Tue Dec 08 15:43:11 2009 +0000
+++ b/ocaml/xapi/xapi_vm_snapshot.ml    Tue Dec 08 15:43:39 2009 +0000
@@ -108,7 +108,17 @@
                (* If an error was occured we get the error type and return *)
                let error_str = xs.Xs.read (snapshot_path ~xs ~domid "error") in
                error "wait_for_snapshot: %s" error_str;
-               raise (Api_errors.Server_error 
(Api_errors.vm_snapshot_with_quiesce_failed, [ Ref.string_of vm ]))
+               if List.mem error_str [
+                       Api_errors.xen_vss_req_error_init_failed;
+                       Api_errors.xen_vss_req_error_prov_not_loaded;
+                       Api_errors.xen_vss_req_error_no_volumes_supported;
+                       Api_errors.xen_vss_req_error_start_snapshot_set_failed;
+                       
Api_errors.xen_vss_req_error_adding_volume_to_snapset_failed;
+                       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 ]))
+               else raise (Api_errors.Server_error 
(Api_errors.vm_snapshot_with_quiesce_failed, [ Ref.string_of vm; error_str ]))
 
        | e -> 
                failwith (Printf.sprintf "wait_for_snapshot: unexpected result 
(%s)" e)
1 file changed, 11 insertions(+), 1 deletion(-)
ocaml/xapi/xapi_vm_snapshot.ml |   12 +++++++++++-


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>