File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ let wait_for_snapshot ~__context ~vm ~xs ~domid ~new_name =
107107 | "snapshot-error" ->
108108 (* If an error was occured we get the error type and return *)
109109 let error_str = xs.Xs. read (snapshot_path ~xs ~domid " error" ) in
110+ let error_code () = try xs.Xs. read (snapshot_path ~xs ~domid " error/code" ) with _ -> " 0" in
110111 error " wait_for_snapshot: %s" error_str;
111112 if List. mem error_str [
112113 Api_errors. xen_vss_req_error_init_failed;
@@ -117,7 +118,7 @@ let wait_for_snapshot ~__context ~vm ~xs ~domid ~new_name =
117118 Api_errors. xen_vss_req_error_preparing_writers;
118119 Api_errors. xen_vss_req_error_creating_snapshot;
119120 Api_errors. xen_vss_req_error_creating_snapshot_xml_string ]
120- then raise (Api_errors. Server_error (error_str, [ Ref. string_of vm ]))
121+ then raise (Api_errors. Server_error (error_str, [ Ref. string_of vm; error_code () ]))
121122 else raise (Api_errors. Server_error (Api_errors. vm_snapshot_with_quiesce_failed, [ Ref. string_of vm; error_str ]))
122123
123124 | e ->
You can’t perform that action at this time.
0 commit comments