Comment 3 for bug 1698383

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

Reviewed: https://review.openstack.org/474994
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0ddf3ce01149d78ee0cf8f7497f8a9074c6f167d
Submitter: Jenkins
Branch: master

commit 0ddf3ce01149d78ee0cf8f7497f8a9074c6f167d
Author: Dan Smith <email address hidden>
Date: Fri Jun 16 07:25:40 2017 -0700

    Fix regression preventing reporting negative resources for overcommit

    In Nova prior to Ocata, the scheduler computes available resources for
    a compute node, attempting to mirror the same calculation that happens
    locally. It does this to determine if a new instance should fit on the
    node. If overcommit is being used, some of these numbers can be negative.

    In change 016b810f675b20e8ce78f4c82dc9c679c0162b7a we changed the
    compute side to never report negative resources, which was an ironic-
    specific fix for nodes that are offline. That, however, has been
    corrected for ironic nodes in 047da6498dbb3af71bcb9e6d0e2c38aa23b06615.
    Since the base change to the resource tracker has caused the scheduler
    and compute to do different math, we need to revert it to avoid the
    scheduler sending instances to nodes where it believes -NNN is the
    lower limit (with overcommit), but the node is reporting zero.

    This doesn't actually affect Ocata because of our use of the placement
    engine. However, this code is still in master and needs to be backported.
    This part of the change actually didn't even have a unit test, so
    this patch adds one to validate that the resource tracker will
    calculate and report negative resources.

    Change-Id: I25ba6f7f4e4fab6db223368427d889d6b06a77e8
    Closes-Bug: #1698383