yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #67706
[Bug 1714769] Re: quota_details is broken for CountableResource provided by plugins other than the core plugin
** Changed in: networking-midonet
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1714769
Title:
quota_details is broken for CountableResource provided by plugins
other than the core plugin
Status in networking-midonet:
Fix Released
Status in networking-ovn:
Fix Released
Status in neutron:
Fix Released
Bug description:
The neutron tempest API test -
neutron.tests.tempest.api.admin.test_quotas.QuotasTest.test_detail_quotas
calls the API - ""GET /v2.0/quotas/{tenant_id}/details" which is
failing with the below logs in the neutron server
INFO neutron.pecan_wsgi.hooks.translation [None req-64308681-f568-4dea-961b-5c9de579ac7e admin admin] GET failed (client error): The resource could not be found.
INFO neutron.wsgi [None req-64308681-f568-4dea-961b-5c9de579ac7e admin admin] 10.0.0.7 "GET /v2.0/quotas/ff5c5121117348df94aa181d3504375b/detail HTTP/1.1" status: 404 len: 309 time: 0.0295429
ERROR neutron.api.v2.resource [None req-b1b677cd-73b1-435d-bcc4-845dfa713046 admin admin] details failed: No details.: AttributeError: 'Ml2Plugin' object has no attribute 'get_floatingips'
ERROR neutron.api.v2.resource Traceback (most recent call last):
ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 98, in resource
ERROR neutron.api.v2.resource result = method(request=request, **args)
ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/extensions/quotasv2_detail.py", line 56, in details
ERROR neutron.api.v2.resource self._get_detailed_quotas(request, id)}
ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/extensions/quotasv2_detail.py", line 46, in _get_detailed_quotas
ERROR neutron.api.v2.resource resource_registry.get_all_resources(), tenant_id)
ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 163, in wrapped
ERROR neutron.api.v2.resource return method(*args, **kwargs)
ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 93, in wrapped
ERROR neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
ERROR neutron.api.v2.resource self.force_reraise()
ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 89, in wrapped
ERROR neutron.api.v2.resource return f(*args, **kwargs)
ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 150, in wrapper
ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
ERROR neutron.api.v2.resource self.force_reraise()
ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 138, in wrapper
ERROR neutron.api.v2.resource return f(*args, **kwargs)
ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 128, in wrapped
ERROR neutron.api.v2.resource LOG.debug("Retry wrapper got retriable exception: %s", e)
ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
ERROR neutron.api.v2.resource self.force_reraise()
ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 124, in wrapped
ERROR neutron.api.v2.resource return f(*dup_args, **dup_kwargs)
ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/quota/driver.py", line 98, in get_detailed_tenant_quotas
ERROR neutron.api.v2.resource used = resource.count(context, plugin, tenant_id)
ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/quota/resource.py", line 132, in count
ERROR neutron.api.v2.resource return self._count_func(context, plugin, self.plural_name, tenant_id)
ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/quota/resource.py", line 38, in _count_resource
ERROR neutron.api.v2.resource obj_getter = getattr(plugin, "get_%s" % collection_name)
ERROR neutron.api.v2.resource AttributeError: 'Ml2Plugin' object has no attribute 'get_floatingips'
ERROR neutron.api.v2.resource
INFO neutron.wsgi [None req-b1b677cd-73b1-435d-bcc4-845dfa713046 admin admin] 10.0.0.7 "GET /v2.0/quotas/ff5c5121117348df94aa181d3504375b/details HTTP/1.1" status: 500 len: 368 time: 0.1003060
*****
After some investigation I think the suspect is this -
https://github.com/openstack/neutron/blob/master/neutron/db/quota/driver.py#L97
The commit
https://github.com/openstack/neutron/commit/a8109af65f275ec1b2e725695bf3bb9976f22ae3
recently added quota_details extension.
The function "directory.get_plugins()" returns the below dict in my
setup.
plugins = {'FLAVORS': <weakproxy at 0x83fb9f0 to FlavorsPlugin at
0x11e48ad0>, 'CORE': <weakproxy at 0x11f24c00 to Ml2Plugin at
0x5fa8310>, 'network-ip-availability': <weakproxy at 0x11e75ba8 to
NetworkIPAvailabilityPlugin at 0x11e48a90>, 'timestamp': <weakproxy at
0x11e75c00 to TimeStampPlugin at 0x11ca5a90>, 'auto-allocated-
topology': <weakproxy at 0x11e75c58 to Plugin at 0x11e4f850>,
'revision_plugin': <weakproxy at 0x11e75cb0 to RevisionPlugin at
0x11e59cd0>, 'TAG': <weakproxy at 0x11e75d08 to TagPlugin at
0x11e56550>, 'L3_ROUTER_NAT': <weakproxy at 0x11e75d60 to
OVNL3RouterPlugin at 0x11acf6d0>, 'LOADBALANCERV2': <weakproxy at
0x11e75db8 to LoadBalancerPluginv2 at 0x11ad6110>}
when the code calls, plugin = plugins.get(key, plugins[constants.CORE]), the value of 'key' is floatingip.
To manage notifications about this bug go to:
https://bugs.launchpad.net/networking-midonet/+bug/1714769/+subscriptions