Bug 1269297
Summary: | Table quota_usages gets out of sync with reality | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | David Hill <dhill> |
Component: | openstack-nova | Assignee: | Lee Yarwood <lyarwood> |
Status: | CLOSED WONTFIX | QA Contact: | nlevinki <nlevinki> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 5.0 (RHEL 6) | CC: | berrange, bhoefer, dasmith, dhill, dyocum, eglynn, kchamart, lyarwood, ndipanov, pbrady, sbauza, sferdjao, sgordon, skinjo, vromanso, yeylon |
Target Milestone: | --- | Keywords: | ZStream |
Target Release: | 5.0 (RHEL 6) | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-02 14:34:24 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
David Hill
2015-10-06 22:19:39 UTC
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`. |