deleting floating-ip in nova-network does not free quota

Bug #1347156 reported by David Kranz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
jichenjc
Nominated for Icehouse by Brent Eagles

Bug Description

It seems that when you allocate a floating-ip in a tenant with nova-network, its quota is never returned after calling 'nova floating-ip-delete' ecen though 'nova floating-ip-list' shows it gone. This behavior applies to each tenant individually. The gate tests are passing because they all run with tenant isolation. But this problem shows in the nightly run without tenant isolation:

http://logs.openstack.org/periodic-qa/periodic-tempest-dsvm-full-non-isolated-master/2bc5ead/console.html

Tags: network
Revision history for this message
David Kranz (david-kranz) wrote :

This bug is a regression from havana to icehouse.

Revision history for this message
Tracy Jones (tjones-i) wrote :

marking high as this is a regression

tags: added: network
Changed in nova:
importance: Undecided → High
Brent Eagles (beagles)
Changed in nova:
status: New → Confirmed
Revision history for this message
Brent Eagles (beagles) wrote :

I've verified that the quota value listed in the quota_usages table does not correctly track allocation and usage. Values increment properly on nova floating-ip-create but are not decremented when nova floating-ip-delete is called. Other values appear to be being managed properly.

Steps to verify:

repeat 11 times:
- create a floating ip
- delete allocated floating ip

Exception will occur
select in_use from nova.quota_usages where resource = "floating_ips";

will return 10 or whatever the current floating IP quota is.

jichenjc (jichenjc)
Changed in nova:
assignee: nobody → jichenjc (jichenjc)
Revision history for this message
jichenjc (jichenjc) wrote :

I think it's the cooperation between 23a27e47 and cbbb9de5

in cbbb9de5, object is not used and it directly use DB returned value, so it's no problem
and 23a27e47 used object instead

@obj_base.remotable_classmethod
    def deallocate(cls, context, address):
        db.floating_ip_deallocate(context, address)

the deallocate function didn't return the value which is supposed to be returned
make every quota rollbacked

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/109220

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/109220
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=77a7d14542600f2badcdf048fe6b586a0ff27e30
Submitter: Jenkins
Branch: master

commit 77a7d14542600f2badcdf048fe6b586a0ff27e30
Author: jichenjc <email address hidden>
Date: Sat Jul 19 18:47:19 2014 +0800

    Commit quota when deallocate floating ip

    It seems that when you allocate a floating-ip in a tenant with nova-network,
    its quota is never returned after calling 'nova floating-ip-delete'
    even though 'nova floating-ip-list' shows it gone.
    This behavior applies to each tenant individually. The gate tests are passing
    because they all run with tenant isolation.

    The root cause of the problem is cooperation between
    commit 23a27e47 and cbbb9de5. db layer code return floatingip_ref
    but object layer didn't. This patch fixed the problem by adding return
    value from object layer.

    Change-Id: Ide1a338b6c33676311028e8738150e146324a8ee
    Closes-Bug: #1347156

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 2014.2
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.