[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH 2 of 3] imported patch xapi-use-the-new-error-messages-for-snapshot-with-quiesce



# 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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.