Merge "Fix error if free_disk_gb is None in CellStateManager"

This commit is contained in:
Jenkins 2016-12-19 17:37:37 +00:00 committed by Gerrit Code Review
commit 784db5a1d7

View File

@ -276,11 +276,9 @@ class CellStateManager(base.Base):
chost = compute_hosts[host]
chost['free_ram_mb'] += max(0, compute.free_ram_mb)
free_disk = compute.free_disk_gb * 1024
chost['free_disk_mb'] += max(0, free_disk)
chost['free_disk_mb'] += max(0, compute.free_disk_gb) * 1024
chost['total_ram_mb'] += max(0, compute.memory_mb)
total_disk = compute.local_gb * 1024
chost['total_disk_mb'] += max(0, total_disk)
chost['total_disk_mb'] += max(0, compute.local_gb) * 1024
_get_compute_hosts()
if not compute_hosts: