From: Jon Ludlam Date: Tue, 12 Oct 2010 09:33:09 +0000 (+0100) Subject: CA-44731: Fix typo in the Host RRD creation code which restricted the rate of RRD... X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c07adc2089495a589c8685218d4a88f767244f74;p=xcp%2Fxen-api.git CA-44731: Fix typo in the Host RRD creation code which restricted the rate of RRD creation to one DS every 5s. Rather than accumulating all the new RRDs, the fold only kept the last one. Signed-off-by: Jon Ludlam Signed-off-by: David Scott --- diff --git a/ocaml/xapi/monitor_rrds.ml b/ocaml/xapi/monitor_rrds.ml index 39940e89..b2c885e8 100644 --- a/ocaml/xapi/monitor_rrds.ml +++ b/ocaml/xapi/monitor_rrds.ml @@ -754,7 +754,7 @@ let update_rrds ~__context timestamp dss uuids pifs rebooting_vms paused_vms = let new_defaults = List.filter (fun ds -> not (List.mem ds.ds_name current_dss)) default_dss in let rrd = if List.length new_defaults > 0 then - let rrd = List.fold_left (fun rrd ds -> Rrd.rrd_add_ds rrdi.rrd (Rrd.ds_create ds.ds_name ds.ds_type ~mrhb:300.0 Rrd.VT_Unknown)) rrdi.rrd new_defaults in + let rrd = List.fold_left (fun rrd ds -> Rrd.rrd_add_ds rrd (Rrd.ds_create ds.ds_name ds.ds_type ~mrhb:300.0 Rrd.VT_Unknown)) rrdi.rrd new_defaults in host_rrd := Some {rrd=rrd; dss=host_dss}; rrd else