fix(load-balancer): fix memory check condition in the performance plan

We must migrate a VM if the free memory in the destination host is lower than the used VM
memory!
This commit is contained in:
Ronan Abhamon
2020-06-08 10:22:34 +02:00
committed by Julien Fontanet
parent 6261f8a778
commit 6973b92c4a
@@ -124,7 +124,7 @@ export default class PerformancePlan extends Plan {
if (
exceededAverages.cpu - vmAverages.cpu <
destinationAverages.cpu + vmAverages.cpu ||
destinationAverages.memoryFree > vmAverages.memory
destinationAverages.memoryFree < vmAverages.memory
) {
debug(`Cannot migrate VM (${vm.id}) to Host (${destination.id}).`)
debug(