]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
CA-44731: Fix typo in the Host RRD creation code which restricted the rate of RRD...
authorJon Ludlam <jon.ludlam@eu.citrix.com>
Tue, 12 Oct 2010 09:33:09 +0000 (10:33 +0100)
committerJon Ludlam <jon.ludlam@eu.citrix.com>
Tue, 12 Oct 2010 09:33:09 +0000 (10:33 +0100)
Rather than accumulating all the new RRDs, the fold only kept the last one.

Signed-off-by: Jon Ludlam <jon.ludlam@eu.citrix.com>
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
ocaml/xapi/monitor_rrds.ml

index 39940e891e179aaee09b4d878549739870b13d79..b2c885e8d9dbff9344227c0c46446c5d60954067 100644 (file)
@@ -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