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.
Reviewed: https:/ /review. openstack. org/474994 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=0ddf3ce0114 9d78ee0cf8f7497 f8a9074c6f167d
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0ddf3ce01149d78 ee0cf8f7497f8a9 074c6f167d
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 016b810f675b20e 8ce78f4c82dc9c6 79c0162b7a we changed the 71bcb9e6d0e2c38 aa23b06615.
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 047da6498dbb3af
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: I25ba6f7f4e4fab 6db223368427d88 9d6b06a77e8
Closes-Bug: #1698383