Limits API doesn't work with Neutron

Bug #1186354 reported by Phil Day
56
This bug affects 10 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Low
Unassigned

Bug Description

The limits API is defined to return quota and usage values for floating ips and security groups, but on a system configured to use Quantum these values need to be retrieved from the quantum client rather than the Nova DB

tags: added: api
tags: added: network
Changed in nova:
status: New → Confirmed
importance: Undecided → Critical
Changed in nova:
importance: Critical → High
milestone: none → havana-3
Shuquan Huang (shuquan)
Changed in nova:
assignee: nobody → Shuquan Huang (spring1201)
Lawrance (jing)
Changed in nova:
assignee: Shuquan Huang (spring1201) → Lawrance (jing)
status: Confirmed → In Progress
Revision history for this message
Lawrance (jing) wrote :

@Phil: in my research, i didn't find any usage of neutron floating ip and security group.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/43822

Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → havana-rc1
Changed in nova:
milestone: havana-rc1 → none
Revision history for this message
Matt Riedemann (mriedem) wrote : Re: Limits API doesn't work with Quantum

Note that when running the tests in this tempest patch https://review.openstack.org/#/c/33152/ using neutron they fail so the above nova patch should resolve that.

Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
wangchy (wangchy) wrote :
Download full text (3.8 KiB)

FYI:
Following errors will be reported each time I run tempest.api.compute.admin.test_quotas:QuotasAdminTestXML.test_security_groups_exceed_limit with sg_api set to neutron:

2013-10-12 03:55:07.072 2924 WARNING neutron.scheduler.l3_agent_scheduler [-] No active L3 agents
2013-10-12 03:55:09.905 2924 ERROR neutron.db.db_base_plugin_v2 [-] Validation for CIDR: 10.100.0.0/24 failed - overlaps with subnet e35804b7-35ed-4dca-aa02-5b7cdfa502b3 (CIDR: 10.100.0.0/24)
2013-10-12 03:55:09.915 2924 ERROR neutron.api.v2.resource [-] create failed
2013-10-12 03:55:09.915 2924 TRACE neutron.api.v2.resource Traceback (most recent call last):
2013-10-12 03:55:09.915 2924 TRACE neutron.api.v2.resource File "/usr/lib/python2.6/site-packages/neutron/api/v2/resource.py", line 84, in resource
2013-10-12 03:55:09.915 2924 TRACE neutron.api.v2.resource result = method(request=request, **args)
2013-10-12 03:55:09.915 2924 TRACE neutron.api.v2.resource File "/usr/lib/python2.6/site-packages/neutron/api/v2/base.py", line 405, in create
2013-10-12 03:55:09.915 2924 TRACE neutron.api.v2.resource obj = obj_creator(request.context, **kwargs)
2013-10-12 03:55:09.915 2924 TRACE neutron.api.v2.resource File "/usr/lib/python2.6/site-packages/neutron/db/db_base_plugin_v2.py", line 1127, in create_subnet
2013-10-12 03:55:09.915 2924 TRACE neutron.api.v2.resource self._validate_subnet_cidr(context, network, s['cidr'])
2013-10-12 03:55:09.915 2924 TRACE neutron.api.v2.resource File "/usr/lib/python2.6/site-packages/neutron/db/db_base_plugin_v2.py", line 740, in _validate_subnet_cidr
2013-10-12 03:55:09.915 2924 TRACE neutron.api.v2.resource raise q_exc.InvalidInput(error_message=err_msg)
2013-10-12 03:55:09.915 2924 TRACE neutron.api.v2.resource InvalidInput: Invalid input for operation: Requested subnet with cidr: 10.100.0.0/24 for network: 2c752684-4b92-439d-ba89-d1dc37adde5d overlaps with another subnet.
2013-10-12 03:55:09.915 2924 TRACE neutron.api.v2.resource
2013-10-12 03:55:11.322 2924 WARNING neutron.scheduler.l3_agent_scheduler [-] No active L3 agents
2013-10-12 03:55:23.234 2924 WARNING neutron.scheduler.l3_agent_scheduler [-] No active L3 agents
2013-10-12 03:55:25.481 2924 WARNING neutron.scheduler.l3_agent_scheduler [-] No active L3 agents
2013-10-12 03:55:26.073 2924 ERROR neutron.api.v2.resource [-] delete failed
2013-10-12 03:55:26.073 2924 TRACE neutron.api.v2.resource Traceback (most recent call last):
2013-10-12 03:55:26.073 2924 TRACE neutron.api.v2.resource File "/usr/lib/python2.6/site-packages/neutron/api/v2/resource.py", line 84, in resource
2013-10-12 03:55:26.073 2924 TRACE neutron.api.v2.resource result = method(request=request, **args)
2013-10-12 03:55:26.073 2924 TRACE neutron.api.v2.resource File "/usr/lib/python2.6/site-packages/neutron/api/v2/base.py", line 420, in delete
2013-10-12 03:55:26.073 2924 TRACE neutron.api.v2.resource obj = self._item(request, id, parent_id=parent_id)
2013-10-12 03:55:26.073 2924 TRACE neutron.api.v2.resource File "/usr/lib/python2.6/site-packages/neutron/api/v2/base.py", line 258, in _item
2013-10-12 03:55:26.073 2924 TRACE neutron.api.v2.resource obj = obj_getter(request.co...

Read more...

Revision history for this message
Matt Riedemann (mriedem) wrote :

I posted a tempest patch to skip the failing tests until this bug is fixed in nova:

https://review.openstack.org/#/c/52207/

Revision history for this message
Matt Riedemann (mriedem) wrote :

I patched my system with https://review.openstack.org/#/c/43822/ and tried running test_quotas_negative (where the negative security group/rule tests live now) with neutron in the backend and it still fails because nova isn't proxying the quota update API call to neutron, so the test still fails.

Either nova needs to change to proxy the quota update API calls to neutron (preferable) or Tempest needs to use the neutron client when faking out the quota from the compute test when using neutron in the backend (hacky, but it would get the limits API changes tested until the nova quota API is changed to proxy to neutron).

Revision history for this message
Matt Riedemann (mriedem) wrote :

The quota API proxy issue is tracked in bug 1263628.

Matt Riedemann (mriedem)
Changed in nova:
importance: High → Low
Revision history for this message
Matt Riedemann (mriedem) wrote :

This missed havana, the patch is almost there, so marking this for icehouse rc1.

tags: added: icehouse-rc-potential
Changed in nova:
importance: Low → High
milestone: none → icehouse-rc1
tags: removed: icehouse-rc-potential
Revision history for this message
Russell Bryant (russellb) wrote :

Since this isn't a regression and also has an obvious workaround, I don't think we should block RC1 for this. I put it on the icehouse-rc-potential list, instead.

Changed in nova:
importance: High → Medium
milestone: icehouse-rc1 → none
tags: added: icehouse-rc-potential
Thierry Carrez (ttx)
tags: added: icehouse-backport-potential
removed: icehouse-rc-potential
Revision history for this message
Jay Pipes (jaypipes) wrote :

Lawrance, can you please give an update on whether you are interested in picking up the patches that are in Abandoned status on this? If not, we can unassign you and get someone else to pick up where you left off.

Marking incomplete until you update the bug. Thanks!

-jay

Changed in nova:
status: In Progress → Incomplete
Brent Eagles (beagles)
tags: added: neutron
Sean Dague (sdague)
Changed in nova:
assignee: Lawrance (jing) → nobody
summary: - Limits API doesn't work with Quantum
+ Limits API doesn't work with Neutron
Sean Dague (sdague)
Changed in nova:
status: Incomplete → Confirmed
Joe Gordon (jogo)
tags: added: quotas
Revision history for this message
Matt Riedemann (mriedem) wrote :

I can pick this up again if needed, I was pretty familiar with the change back in Havana/Icehouse time frames, it got waylaid by a few other changes going on at the time, and our position on proxying to neutron in the v2.1 API has changed since havana with the v3 API where we said we wouldn't proxy anything, so doing this should be pretty straight-forward.

Revision history for this message
Matt Riedemann (mriedem) wrote :

If we do this, we might need a small blueprint/spec for Liberty given how it's touching the API extensions.

Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

So we should make a proxy to neutron now?

Revision history for this message
Matt Riedemann (mriedem) wrote :

Given http://docs.openstack.org/developer/nova/project_scope.html?highlight=proxy#no-more-api-proxies I think that means we should just fail fast in the compute API if we're using neutron and asked for quotas on network resources.

tags: removed: icehouse-backport-potential
Matt Riedemann (mriedem)
Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Cale Rath (ctrath)
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/199604
Reason: This patch has been stalled for quite a while, so I am going to abandon it to keep the code review queue sane. Please restore the change when it is ready for review.

Sean Dague (sdague)
Changed in nova:
importance: Medium → Low
Revision history for this message
Matt Riedemann (mriedem) wrote :

Here was the spec for this: https://review.openstack.org/#/c/206735/

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

Blueprint limits-quota-usage-from-neutron [1] will drive the effort. It didn't make the cut for Mitaka [2] and need to be re-proposed for Newton.

References:
[1] https://blueprints.launchpad.net/nova/+spec/limits-quota-usage-from-neutron
[2] https://review.openstack.org/#/c/206735/

Changed in nova:
status: In Progress → Opinion
Matt Riedemann (mriedem)
Changed in nova:
assignee: Cale Rath (ctrath) → nobody
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.