Skip to content

Commit

Permalink
fixup review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Gang Ji <gang.ji@citrix.com>
  • Loading branch information
Gang Ji committed May 7, 2024
1 parent daa9db6 commit 147fe8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ocaml/xapi/xapi_ha_vm_failover.ml
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ let rec vm_anti_affinity_no_breach_plan ~__context hosts_increasing
remaining_vms vm_can_boot_on_host grp_ranked_hosts mapping
)

(** Return an evacuation plan respecting VM anti-affinity rules: it is done is 3 phases:
(** Return an evacuation plan respecting VM anti-affinity rules: it is done in 3 phases:
1. Try to get a "spread evenly" plan for anti-affinity VMs, and then a binpack plan for
the rest of VMs. Done if every VM got planned, otherwise continue.
2. Try to get a "no breach" plan for anti-affinity VMs, and then a binpack plan for the
Expand Down Expand Up @@ -532,8 +532,8 @@ let vm_anti_affinity_evacuation_plan ~__context total_hosts hosts vms
debug "Try to binpack for the rest VMs" ;
let config_after_plan_applied = Binpack.apply_plan config plan in
let vms_to_plan =
let planed_vm = List.map fst plan in
vms |> List.filter (fun (vm, _) -> not (List.mem vm planed_vm))
let planned_vm = List.map fst plan in
vms |> List.filter (fun (vm, _) -> not (List.mem vm planned_vm))
in
let config_after_plan_applied =
{config_after_plan_applied with vms= vms_to_plan}
Expand Down

0 comments on commit 147fe8f

Please sign in to comment.