limits API raises TypeError with NoopQuotaDriver

Bug #1288814 reported by Matthew Edmonds
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Incomplete
Undecided
Unassigned

Bug Description

when quota_driver=nova.quota.NoopQuotaDriver in nova.conf, a GET v2/{tenant_id}/limits request fails with HTTP 400 and api.log shows the following stacktrace:

2014-03-03 04:16:31.468 3182 TRACE nova.api.openstack.wsgi Traceback (most recent call last):
2014-03-03 04:16:31.468 3182 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py", line 1012, in _process_stack
2014-03-03 04:16:31.468 3182 TRACE nova.api.openstack.wsgi action_result = self.dispatch(meth, request, action_args)
2014-03-03 04:16:31.468 3182 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py", line 1093, in dispatch
2014-03-03 04:16:31.468 3182 TRACE nova.api.openstack.wsgi return method(req=request, **action_args)
2014-03-03 04:16:31.468 3182 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/limits.py", line 96, in index
2014-03-03 04:16:31.468 3182 TRACE nova.api.openstack.wsgi abs_limits = dict((k, v['limit']) for k, v in quotas.items())
2014-03-03 04:16:31.468 3182 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/limits.py", line 96, in <genexpr>
2014-03-03 04:16:31.468 3182 TRACE nova.api.openstack.wsgi abs_limits = dict((k, v['limit']) for k, v in quotas.items())
2014-03-03 04:16:31.468 3182 TRACE nova.api.openstack.wsgi TypeError: 'int' object is unsubscriptable

This appears to be because v = -1 for all resources with the NoopQuotaDriver

Revision history for this message
Hans Lindgren (hanlind) wrote :

What version are you running?
I think a fix for this was merged in icehouse-2 and then just recently back-ported to havana.
See: https://bugs.launchpad.net/nova/+bug/1244842

Changed in nova:
status: New → Incomplete
Revision history for this message
Matthew Edmonds (edmondsw) wrote :

I was using havana, apparently pre-backport. Marked this as a dup. Thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.