nova reports Neutron port OverQuota error when the real problem from Neutron is IpAddressGenerationFailure

Bug #1331353 reported by Xu Han Peng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Xu Han Peng

Bug Description

Nove raise "Neutron error: quota exceeded" when neutron state code is 409 (conflict):

https://github.com/openstack/nova/blob/2014.1.1/nova/network/neutronv2/api.py#L187

The real cause of 409 in Neutron can be OverQuota or IpAddressGenerationFailure(no more IP available from allocation pool). So we need to raise the error from nova side more precisely to reflect the real error.

This can be done to check the exception defined in neutron client:

OverQuotaClient:
https://github.com/openstack/python-neutronclient/blob/master/neutronclient/common/exceptions.py#L142

IpAddressGenerationFailureClient:
https://github.com/openstack/python-neutronclient/blob/master/neutronclient/common/exceptions.py#L152

Xu Han Peng (xuhanp)
Changed in nova:
assignee: nobody → Xu Han Peng (xuhanp)
Tracy Jones (tjones-i)
tags: added: network
Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
tags: added: neutron
Changed in nova:
importance: Undecided → Medium
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/101462

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/101462
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a09e7327aeba03eb6f2b1ae91d49aec9c6475773
Submitter: Jenkins
Branch: master

commit a09e7327aeba03eb6f2b1ae91d49aec9c6475773
Author: Xu Han Peng <email address hidden>
Date: Fri Jun 20 17:37:26 2014 +0800

    Raise specific error of network IP allocation

    Currently Nova raise "Neutron error: quota exceeded" when
    neutron client state code is 409 in IP allocation without
    caring about if the real error is over quota.

    This fixes raises PortLimitExceeded if error from neutron
    client is OverQuota and raises NoMoreFixedIps if error from
    neutron client is IpAddressGenerationFailure. If the error
    is neither of these two errors above, it reraises the original
    exception from neutron client.

    Change-Id: I0d1942587a359acccfca5298c2dcb4b21d971a42
    Closes-Bug: 1331353

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.