commit 5ac4c70b8ad63a0fd7cea9f66e925569eaf0612c
Author: Dan Smith <email address hidden>
Date: Mon Mar 24 12:24:35 2025 -0700
Fix placement allocate while over-capacity
There is a bug in the placement over-capacity check that prevents
updating existing allocations if a resource provider is over capacity,
even if that change makes no change to the amount of resources that
are allocated, or even if the allocation makes the situation better.
This can happen when the reserved or allocation_ratio is changed on
a provider with existing allocations. The bug prevents escaping this
situation by deallocating resources unless a single atomic allocation
can be performed to result in an under-capacity outcome. That is not
something consumers like Nova can orchestrate and thus operators get
stuck in a situation where they must un-reserve some resource, or
temporarily increase the allocation_ratio in order to be able to
escape. That could result in a worsening situation.
This change makes us allow allocation changes if they improve or
otherwise do not worsen an over-capacity situation, which is clearly
what operators expect based on the multiple bugs opened against Nova
for this issue.
Reviewed: https:/ /review. opendev. org/c/openstack /placement/ +/945465 /opendev. org/openstack/ placement/ commit/ 5ac4c70b8ad63a0 fd7cea9f66e9255 69eaf0612c
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 5ac4c70b8ad63a0 fd7cea9f66e9255 69eaf0612c
Author: Dan Smith <email address hidden>
Date: Mon Mar 24 12:24:35 2025 -0700
Fix placement allocate while over-capacity
There is a bug in the placement over-capacity check that prevents
updating existing allocations if a resource provider is over capacity,
even if that change makes no change to the amount of resources that
are allocated, or even if the allocation makes the situation better.
This can happen when the reserved or allocation_ratio is changed on
a provider with existing allocations. The bug prevents escaping this
situation by deallocating resources unless a single atomic allocation
can be performed to result in an under-capacity outcome. That is not
something consumers like Nova can orchestrate and thus operators get
stuck in a situation where they must un-reserve some resource, or
temporarily increase the allocation_ratio in order to be able to
escape. That could result in a worsening situation.
This change makes us allow allocation changes if they improve or
otherwise do not worsen an over-capacity situation, which is clearly
what operators expect based on the multiple bugs opened against Nova
for this issue.
Closes-Bug: #2104040 f9b604a3bcd2a41 7cc175e3793
Related-Bug: #1924123
Related-Bug: #1941892
Related-Bug: #1943191
Change-Id: If7264d3ce679b6