Bug 1321661

Summary: Table quota_usages gets out of sync with reality
Product: Red Hat OpenStack Reporter: Jack Waterworth <jwaterwo>
Component: openstack-novaAssignee: Eoghan Glynn <eglynn>
Status: CLOSED WONTFIX QA Contact: nlevinki <nlevinki>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.0 (RHEL 6)CC: berrange, dasmith, eglynn, kchamart, ndipanov, sbauza, sferdjao, sgordon, vromanso, yeylon
Target Milestone: ---   
Target Release: 8.0 (Liberty)   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-05 14:48:07 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:

Description Jack Waterworth 2016-03-28 19:48:42 UTC
Description of problem:
Tenant quotas don't accurately reflect the actual usage.  For instance, the Red Hat Mobile tenant is really using 27 floating IPs, but the nova.quota_usages table shows 254 (out of 254).

Version-Release number of selected component (if applicable):
OS1 Public, RHEL-OSP5

How reproducible:
Intermittent

This appears to be related (or identical to) bz 1269297.   After making the recommended changes, the quota usages still do not get updated.

output from the nova-quota-sync script referenced in the previous bz: http://pastebin.test.redhat.com/360241

Customer has set current usage to -1 manually to try to force an update, as well as updating the until_refresh value

db loaded up here: root.211.141. relevant output: http://pastebin.test.redhat.com/360251

[root@public-control1 tmp]# grep until_refresh /etc/nova/nova.conf
#until_refresh=0
until_refresh=5
[root@public-control1 tmp]# grep max_age /etc/nova/nova.conf
#max_age=0
max_age=21600

Comment 3 Vladik Romanovsky 2016-04-05 14:48:07 UTC
Hello,

Unfortunately, this is known bug. A fix for this issue has been proposed to OpenStack Newton, however, not yet implemented. [1]

Alternately, there is a tool [2] that has been written by a major openstack user, that addressed this problem.

Please note, that this tool is not supported by Red Hat.

[1] - https://review.openstack.org/#/c/286302/
[2] - http://openstack-in-production.blogspot.ca/2015/03/nova-quota-usage-synchronization.html