Signed-off-by: Jon Ludlam <[email protected]>

 ocaml/client_records/records.ml |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


# HG changeset patch
# User Jonathan Ludlam <[email protected]>
# Date 1266859776 0
# Node ID d3c3ce09576c786a8d37dbdf857cb19528f7a224
# Parent  2ac7d89693dfec85acbbeb075e3272f5fa039ec8
CA-37274: Fix a Not_found exception when getting the memory_target metric for a recently-started new VM

Signed-off-by: Jon Ludlam <[email protected]>

diff -r 2ac7d89693df -r d3c3ce09576c ocaml/client_records/records.ml
--- a/ocaml/client_records/records.ml	Mon Feb 22 17:29:36 2010 +0000
+++ b/ocaml/client_records/records.ml	Mon Feb 22 17:29:36 2010 +0000
@@ -543,6 +543,7 @@
 		inner 0
 	in
 	let get_memory_target () =
+	        try
 		Int64.to_string (
 			try
 				Int64.of_float (
@@ -552,6 +553,7 @@
 			with Api_errors.Server_error (code, _)
 			when code = Api_errors.vm_bad_power_state -> 0L
 		)
+                with _ -> "<unknown>"
 	in
 	let xgm () = lzy_get guest_metrics in
 	{
_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to