Should count instances in build requests when check quotas
Bug #1716706 reported by
Zhenyu Zheng
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Triaged
|
Medium
|
Unassigned |
Bug Description
In https:/
changed to use new quota check workflows which counts all consumed resources across cells and
comparing with the limits.
But the resources in build_requests was not counted and this might
lead to creating 20 instances in concurrent requests, i'll probably get 10 in ERROR state rather
than 10 plus 10 failed requests with 409s. Which might be a big change to users.
We should also count instance records from build requests as consumed resources in order to
avoid allowing creation requests pass API layer checks and stopped in conductor layer check,
which lead instances to ERROR state.
Changed in nova: | |
assignee: | nobody → Zhenyu Zheng (zhengzhenyu) |
Changed in nova: | |
assignee: | Zhenyu Zheng (zhengzhenyu) → nobody |
To post a comment you must log in.
We should be able to easily count build_requests in the API DB and include those in the count for instances, but the API also checks cores/ram when counting instances and we don't have that information in the build_request (well, we do, but it's in the serialized build_requests. instance field, which can't be queried via SQL).
And we can't use Placement to count VCPU/MEMORY_MB during the API check since the allocations aren't created in Placement yet (those get created when the scheduler picks a host).
So we might need to add vcpus/memory_mb fields on the build_requests table to mimic the instances table for counting those resources before the API casts to conductor.