limits API raises TypeError with NoopQuotaDriver

Bug #1288814 reported by Matthew Edmonds on 2014-03-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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

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
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  Edit
Everyone can see this information.

Other bug subscribers