File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -2501,10 +2501,8 @@ functor
2501
2501
let snapshot = Db.VM. get_record ~__context ~self: vm in
2502
2502
reserve_memory_for_vm ~__context ~vm ~host ~snapshot
2503
2503
~host_op: `vm_migrate (fun () ->
2504
- Db.VM. get_VGPUs ~__context ~self: vm
2505
- |> List. iter (fun _ ->
2506
- Xapi_stats. incr_pool_vgpu_migration_count ()
2507
- ) ;
2504
+ if Db.VM. get_VGPUs ~__context ~self: vm <> [] then
2505
+ Xapi_stats. incr_pool_vgpu_migration_count () ;
2508
2506
forward_vm_op ~local_fn ~__context ~vm ~remote_fn
2509
2507
)
2510
2508
) ;
@@ -2626,10 +2624,8 @@ functor
2626
2624
assert_can_migrate ~__context ~vm ~dest ~live ~vdi_map
2627
2625
~vif_map ~vgpu_map ~options
2628
2626
) ;
2629
- vgpu_map
2630
- |> List. iter (fun _ ->
2631
- Xapi_stats. incr_pool_vgpu_migration_count ()
2632
- ) ;
2627
+ if vgpu_map <> [] then
2628
+ Xapi_stats. incr_pool_vgpu_migration_count () ;
2633
2629
forward_migrate_send ()
2634
2630
)
2635
2631
in
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ let generate_master_stats ~__context =
54
54
let vgpu_migration_count_ds =
55
55
( Rrd. Host
56
56
, Ds. ds_make ~name: " pool_vgpu_migration_count"
57
- ~description: " Number of vGPU migrations occurred since last rrd update "
57
+ ~description: " Number of vGPU migrations occurred"
58
58
~value: (Rrd. VT_Int64 vgpu_migration_count) ~ty: Rrd. Absolute
59
59
~default: true ~min: 0. ~units: " count" ()
60
60
)
You can’t perform that action at this time.
0 commit comments