Description of problem: Active provision calculations were using very specific MiqQueue entries to include for the active counts. MiqQueue entries are transient and some MiqQueue entries state changes disqualify them from being included in the active counts. This caused the total active provision quota counts, at times, to be understated which caused quota to be over allocated. We changed the way we calculate quota to use MiqRequest entries which gives us a much more accurate count of active provisions and will prevent quota from being over allocated. Version-Release number of selected component (if applicable): How reproducible: Can reproduce most of the time, is timing sensitive. Steps to Reproduce: 1. Setup Tenant Quota Limits for VMs only so that there are 3 available VMs. 2. Create a new Service to provision 3 VMs(Do not use dialog to override the number of VMs or any quota value) 3. Order the Service for the tenant user from 2 different browsers. 4. Notice that only 1 of the Services passed quota, when previously, it would have allowed both Services to pass quota. ***Important Note - It's possible, based on timing, that both Services would be denied due to quota limits because each Service Request counted the other Service request. This is expected behavior. If this happens, order another Service and see that it passed quota. Actual results: Over allocated Quota. Expected results: Proper allocation for Quota. Additional info: Fix Initially applied here: https://bugzilla.redhat.com/show_bug.cgi?id=1489507
Original BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1456819 Upstream PR https://github.com/ManageIQ/manageiq/pull/16831