floating-ips API extension doesn't handle NeutronClientException

Bug #1225134 reported by Mathew Odden
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Christopher Yeoh

Bug Description

While testing some error message responses on the Nova floating-ips API extension, I found that if an IP is requested from a pool that has no more IPs and if the OpenStack is configured to use Neutron, the server throws back an HTTP 500 because the extension doesn't handle the NeutronClientException. The extension looks like it expects a Nova exception for not enough floating IPs instead.

Seems like the extension just needs to be updated.

Tags: api network
Revision history for this message
Mathew Odden (locke105) wrote :
tags: added: api network
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Changed in nova:
assignee: nobody → Christopher Yeoh (cyeoh-0)
Revision history for this message
Neetu Jain (nutshi) wrote :

I can look into it with some guidance .. ( this will be my first bug fix)

Revision history for this message
Neetu Jain (nutshi) wrote :

seems like we need to import

from neutronclient.common import exceptions as n_exc

and then handle
/github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/floating_ips.py#L161

by adding
except n_exc.NeutronClientException:

is that correct?

Revision history for this message
Christopher Yeoh (cyeoh-0) wrote :

Fix has been commited here 8cd0a4120649d7dfa067731c7018afcfa5c7f833

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