Merge "update noisy_neighbor strategy"

This commit is contained in:
Zuul
2019-08-12 02:07:04 +00:00
committed by Gerrit Code Review
2 changed files with 5 additions and 5 deletions

View File

@@ -229,9 +229,9 @@ class NoisyNeighbor(base.NoisyNeighborBaseStrategy):
dest_servers = []
for host in hosts:
cores_used, mem_used, disk_used = self.calc_used_resource(host)
cores_available = host.vcpus - cores_used
disk_available = host.disk - disk_used
mem_available = host.memory - mem_used
cores_available = host.vcpu_capacity - cores_used
disk_available = host.disk_gb_capacity - disk_used
mem_available = host.memory_mb_capacity - mem_used
if (cores_available >= required_cores and disk_available >=
required_disk and mem_available >= required_memory):
dest_servers.append(host)