Description of problem: Users are getting this error when they try to launch new VMs: Error: Quota exceeded for ram: Requested 8192, but already used 244992 of 245760 ram (HTTP 413) (Request-ID: req-0beefdf0-cae5-4f76-986a-7caf1d1e0b45) However, the actual amount of ram used by the tenant is 182GB, not 245GB. Version-Release number of selected component (if applicable): How reproducible: Intermittent Steps to Reproduce: 1. Create/destroy VMs , get issues while creating/deleting VMs 2. Try to create a new VM 3. Actual results: Quota exceeded Expected results: Quota should always be in sync Additional info: Many people worked on a quota cleanup script that is attached to the case attached to this BZ . Would it be possible to have such a cleanup script officialized or perhaps figuring out the root cause of this issue.
Closing this bug as WONTFIX given the documented workarounds and significant effort required to rework this complex area of Nova's code base. Once plans for this work are confirmed upstream we should open fresh bugs to track this work into RHEL OSP.
Lee - Does this look like a sufficient tl;dr summary: 1. Enable periodic quota usage resyncs by Nova # openstack-config --set /etc/nova/nova.conf DEFAULT max_age 86400 # openstack-config --set /etc/nova/nova.conf DEFAULT until_refresh 5 # mysql nova -e "update nova.quota_usages set until_refresh = 5 where deleted = 0 and until_refresh is null;" 2. Force Nova to refresh quota usage during a given users next reservation. # mysql nova -e "update quota_usages set in_use=-1 where resource = 'instances' or resource = 'cores' or resource = 'ram' or resource = 'fixed_ips';" 3. Update the in_use values for resources in the quota_usages table. # wget https://raw.githubusercontent.com/cernops/nova-quota-sync/master/nova-quota-sync # python nova-quota-sync --all
Dan, as discussed 1 and 2 looks fine and should negate the need for 3.
Thank you, both for working on it. Let me double-check about #2 This query: "update quota_usages set in_use=-1 where resource = 'instances' or resource = 'cores' or resource = 'ram' or resource = 'fixed_ips';" should be: "update nova.quota_usages set in_use=-1 where resource = 'instances' or resource = 'cores' or resource = 'ram' or resource = 'fixed_ips';" What do you think?
(In reply to Shinobu KINJO from comment #10) > Thank you, both for working on it. > Let me double-check about #2 > > This query: > > "update quota_usages set in_use=-1 where resource = 'instances' or resource > = 'cores' or resource = 'ram' or resource = 'fixed_ips';" > > should be: > > "update nova.quota_usages set in_use=-1 where resource = 'instances' or > resource = 'cores' or resource = 'ram' or resource = 'fixed_ips';" > > What do you think? That isn't required if you are using `mysql nova -e $QUERY`.