Comment 8 for bug 1698383

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

Reviewed: https://review.openstack.org/475057
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d8b30c3772dae32ac4cbedb659f6d08eb795425a
Submitter: Jenkins
Branch: stable/newton

commit d8b30c3772dae32ac4cbedb659f6d08eb795425a
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.

    Conflicts:
          nova/compute/resource_tracker.py

    NOTE(mriedem): The conflict is due to change
    I6827137f35c0cb4f9fc4c6f753d9a035326ed01b not being in Newton.

    Change-Id: I25ba6f7f4e4fab6db223368427d889d6b06a77e8
    Closes-Bug: #1698383
    (cherry picked from commit 0ddf3ce01149d78ee0cf8f7497f8a9074c6f167d)
    (cherry picked from commit 3284851437e24250d46edba20789a2e5f1f435a0)