Error when trying to get quota details of a tenant

Bug #1709913 reported by Itzik Brown on 2017-08-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-odl
Low
Unassigned

Bug Description

When running the neutron.tests.tempest.api.admin.test_quotas.QuotasTest.test_detail_quotas it fails
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tempest/test.py", line 122, in wrapper
    return func(*func_args, **func_kwargs)
  File "/usr/lib/python2.7/site-packages/neutron/tests/tempest/api/admin/test_quotas.py", line 149, in test_detail_quotas
    quota_set = self.admin_client.show_details_quota(tenant_id)
  File "/usr/lib/python2.7/site-packages/neutron/tests/tempest/services/network/json/network_client.py", line 136, in _show
    resp, body = self.get(uri)
  File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 285, in get
    return self.request('GET', url, extra_headers, headers)
  File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 659, in request
    self._error_checker(resp, resp_body)
  File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 836, in _error_checker
    message=message)
tempest.lib.exceptions.ServerFault: Got server fault
Details: Request Failed: internal server error while processing your request.

The Error from Neutron log
==========================
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource [req-71a15c69-0611-4869-811b-9acef7113f09 ee065ece17c84cc2afecfa2454867109 06469d4828a3422791fa611a9777d85e - default default] details failed: No details.: AttributeError: 'Ml2Plugin' object has no attribute 'get_floatingips'
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource Traceback (most recent call last):
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 99, in resource
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource result = method(request=request, **args)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/extensions/quotasv2_detail.py", line 56, in details
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource self._get_detailed_quotas(request, id)}
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/extensions/quotasv2_detail.py", line 46, in _get_detailed_quotas
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource resource_registry.get_all_resources(), tenant_id)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 164, in wrapped
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource return method(*args, **kwargs)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 94, in wrapped
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource self.force_reraise()
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 90, in wrapped
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 150, in wrapper
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource self.force_reraise()
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 138, in wrapper
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 129, in wrapped
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource LOG.debug("Retry wrapper got retriable exception: %s", e)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource self.force_reraise()
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 125, in wrapped
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource return f(*dup_args, **dup_kwargs)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/quota/driver.py", line 98, in get_detailed_tenant_quotas
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource used = resource.count(context, plugin, tenant_id)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/quota/resource.py", line 133, in count
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource return self._count_func(context, plugin, self.plural_name, tenant_id)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/quota/resource.py", line 39, in _count_resource
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource obj_getter = getattr(plugin, "get_%s" % collection_name)
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource AttributeError: 'Ml2Plugin' object has no attribute 'get_floatingips'
2017-08-10 15:11:17.036 727856 ERROR neutron.api.v2.resource
2017-08-10 15:11:17.038 727856 INFO neutron.wsgi [req-71a15c69-0611-4869-811b-9acef7113f09 ee065ece17c84cc2afecfa2454867109 06469d4828a3422791fa611a9777d85e - default default] 172.17.1.11 "GET /v2.0/quotas/5b54bac7778347b9a5b39be39d4dc9c1/details HTTP/1.1" status: 500 len: 363 time: 0.2441590

It seems that the problem is getting the quota details of a tenant:

An example for a REST API call for getting the quota details:
v2.0/quotas/2cc30f57f8ca4ef78baf519c075e56ec/details

Version
==========
python-networking-odl-11.0.0-0.20170804111351.a27bd55.el7ost.noarch

Itzik Brown (itzikb1) on 2017-08-10
description: updated
Itzik Brown (itzikb1) on 2017-08-16
summary: - The Neutron API test test_detail_quotas fails
+ Error when trying to get quota details of a tenant
description: updated
Isaku Yamahata (yamahata) wrote :

works for me.
I changed quota for floatingip and created floating ip, then quota show.
The logic that caused the stack trace is in neutron common code.
I suspect config issue.

Can you please test with RC candidate?

Changed in networking-odl:
status: New → Incomplete
Waldemar Znoinski (wznoinsk) wrote :
Download full text (18.4 KiB)

Isaku I can still see this test failing with:

- https://github.com/openstack/networking-odl/tree/70f79c7cd3a48f02a09e002055081f979065f6ec
- https://github.com/openstack/neutron/tree/6b26bc57f6ddf615ed1f0b55f1fad8d02a9301ee

content of files in /etc/neturon

- - -/etc/neutron/lbaas_agent.ini - - -
[DEFAULT]
[haproxy]

- - -/etc/neutron/services_lbaas.conf - - -
[DEFAULT]
[haproxy]
[octavia]
[radwarev2]
[radwarev2_debug]

- - -/etc/neutron/l3_agent.ini - - -
[DEFAULT]
[agent]
[ovs]

- - -/etc/neutron/metering_agent.ini - - -
[DEFAULT]
[agent]
[ovs]

- - -/etc/neutron/networking_bgpvpn.conf - - -
[service_providers]
service_provider=BGPVPN:Dummy:networking_bgpvpn.neutron.services.service_drivers.driver_api.BGPVPNDriver:default

- - -/etc/neutron/plugins/ml2/ml2_conf.ini - - -
[DEFAULT]
[ml2]
type_drivers=vxlan,vlan,flat,gre
tenant_network_types=vxlan
mechanism_drivers=opendaylight_v2
extension_drivers=port_security
path_mtu=0
overlay_ip_version=4
[ml2_type_flat]
flat_networks=datacentre
[ml2_type_geneve]
[ml2_type_gre]
tunnel_id_ranges=1:4094
[ml2_type_vlan]
network_vlan_ranges=datacentre:1:1000
[ml2_type_vxlan]
vni_ranges=1:4094
vxlan_group=224.0.0.1
[securitygroup]
firewall_driver=openvswitch
[ml2_odl]
username=odladmin
password=redhat
url=http://172.17.1.16:8081/controller/nb/v2/neutron

- - -/etc/neutron/plugins/ml2/openvswitch_agent.ini - - -
[DEFAULT]
[agent]
[ovs]
[securitygroup]
[xenapi]

- - -/etc/neutron/plugins/ml2/ml2_conf_odl.ini - - -
[ml2_odl]

- - -/etc/neutron/plugins/ml2/sriov_agent.ini - - -
[DEFAULT]
[agent]
[sriov_nic]

- - -/etc/neutron/plugins/ml2/linuxbridge_agent.ini - - -
[DEFAULT]
[agent]
[linux_bridge]
[securitygroup]
[vxlan]

- - -/etc/neutron/plugins/networking-ovn/networking-ovn.ini - - -
[DEFAULT]
[ovn]

- - -/etc/neutron/conf.d/README - - -
This directory can be used to configure Neutron services with custom
user-defined configuration files. To use the facility, just drop a file (or a
symlink) that has .conf file name extension into an appropriate directory to
make a service read it during initialization. 'common' directory is read by all
Neutron services.
Note that user-defined configuration files override any configuration values
defined in other files read by services. Service specific configuration
directories beat common one.

- - -/etc/neutron/neutron_lbaas.conf - - -
[DEFAULT]
[certificates]
[quotas]
[service_auth]
[service_providers]

- - -/etc/neutron/neutron.conf - - -
[DEFAULT]
bind_host=172.17.1.10
auth_strategy=keystone
core_plugin=ml2
service_plugins=odl-router_v2,trunk
dns_domain=openstacklocal
dhcp_agent_notification=True
allow_overlapping_ips=True
host=controller-0.localdomain
notify_nova_on_port_status_changes=True
notify_nova_on_port_data_changes=True
global_physnet_mtu=1500
api_workers=4
rpc_workers=4
dhcp_agents_per_network=1
router_distributed=False
enable_dvr=False
router_scheduler_driver=neutron.scheduler.l3_agent_scheduler.ChanceScheduler
allow_automatic_l3agent_failover=True
l3_ha=False
max_l3_agents_per_router=3
debug=True
log_dir=/var/log/neutron
transport_url=rabbit://guest:<email address hidden>:5672/?ssl=0
control_exchange=neutron
[agent]
ro...

Changed in networking-odl:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers