commit 58bf5d005394d2b31bab9e8971e765c35974ca07
Author: int32bit <email address hidden>
Date: Sun Dec 11 15:08:45 2016 +0800
Fix error if free_disk_gb is None in CellStateManager
The field 'free_disk_gb' in Objects.ComputeNode can be nullable.
In CellStateManager._get_compute_hosts, we compute free_disk_mb
by 'free_disk_gb * 1024'. If the free_disk_gb is None, it will raise
a TypeError exception because None type can't multiply by an integer.
We should check this value, and if it's None, we just let it return
zero.
Reviewed: https:/ /review. openstack. org/409501 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=58bf5d00539 4d2b31bab9e8971 e765c35974ca07
Committed: https:/
Submitter: Jenkins
Branch: master
commit 58bf5d005394d2b 31bab9e8971e765 c35974ca07
Author: int32bit <email address hidden>
Date: Sun Dec 11 15:08:45 2016 +0800
Fix error if free_disk_gb is None in CellStateManager
The field 'free_disk_gb' in Objects.ComputeNode can be nullable. r._get_ compute_ hosts, we compute free_disk_mb
In CellStateManage
by 'free_disk_gb * 1024'. If the free_disk_gb is None, it will raise
a TypeError exception because None type can't multiply by an integer.
We should check this value, and if it's None, we just let it return
zero.
Closes-Bug: #1648983
Change-Id: I558d544ff83880 7c1d605cb5ed8d0 e0fa97ab00e