|
|
|
|
|
|
|
|
|
|
xen-api
[Xen-API] [PATCH 4 of 8] [CA-31705] Improves error handling within vm-me
# HG changeset patch
# User Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
# Date 1264782656 0
# Node ID 1200307a6261ae198abc9013a6dd3bc0cd6ddbdb
# Parent a8a2db5d8db352fc4d5cb55621302ce883bfb0a0
[CA-31705] Improves error handling within vm-memory-target-wait.
Moves the timeout error handler to a point in the function where the values of
memory_actual and memory_target are defined.
Signed-off-by: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
diff -r a8a2db5d8db3 -r 1200307a6261 ocaml/xapi/xapi_vm_helpers.ml
--- a/ocaml/xapi/xapi_vm_helpers.ml Fri Jan 29 16:29:11 2010 +0000
+++ b/ocaml/xapi/xapi_vm_helpers.ml Fri Jan 29 16:30:56 2010 +0000
@@ -650,10 +650,6 @@
?(tolerance_bytes = wait_memory_target_tolerance_bytes)
() =
let rec wait accumulated_wait_time_seconds =
- if accumulated_wait_time_seconds >
wait_memory_target_timeout_seconds
- then raise (Api_errors.Server_error
- (Api_errors.vm_memory_target_wait_timeout,
- [Ref.string_of (Context.get_task_id
__context)]));
if TaskHelper.is_cancelling ~__context
then raise (Api_errors.Server_error
(Api_errors.task_cancelled,
@@ -696,6 +692,10 @@
its target = %Ld bytes; actual = %Ld bytes."
accumulated_wait_time_seconds domain_id
memory_target_bytes memory_actual_bytes;
+ if accumulated_wait_time_seconds >
wait_memory_target_timeout_seconds
+ then raise (Api_errors.Server_error
+
(Api_errors.vm_memory_target_wait_timeout,
+ [Ref.string_of (Context.get_task_id
__context)]));
(* The memory target has not yet been reached: *)
(* wait for a while before repeating the test. *)
Thread.delay 1.0;
1 file changed, 4 insertions(+), 4 deletions(-)
ocaml/xapi/xapi_vm_helpers.ml | 8 ++++----
xen-api.hg-8.patch
Description: Text Data
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|
|
|
|
|