Comment 2 for bug 1648983

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/409501
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=58bf5d005394d2b31bab9e8971e765c35974ca07
Submitter: Jenkins
Branch: master

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.

    Closes-Bug: #1648983

    Change-Id: I558d544ff838807c1d605cb5ed8d0e0fa97ab00e