floatingip-create on a subnet with exhausted IPs throws internal server error

Bug #1354922 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R1.1
Fix Committed
High
Prakash Bailkeri
Trunk
Fix Committed
High
Prakash Bailkeri

Bug Description

Build 1.10 10

root@nodec22:~# neutron floatingip-create public_vn
Request Failed: internal server error while processing your request.
root@nodec22:~#

contrail-api log :
===============
<class 'cfgm_common.exceptions.HttpError'>
Python 2.7.3: /usr/bin/python
Sun Aug 10 12:04:49 2014

A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.

 /usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py in plugin_create_floatingip(self=<vnc_openstack.neutron_plugin_interface.NeutronPluginInterface object>, context={u'is_admin': True, u'operation': u'CREATE', u'roles': [u'Member', u'_member_', u'admin'], u'tenant': u'3088e9aba97b4f2ea6050275fc890f5c', u'tenant_id': u'3088e9aba97b4f2ea6050275fc890f5c', u'type': u'floatingip', u'user_id': u'b0cfcb54022b4f6d81fecbd339fb1f8a'}, floatingip={u'fields': None, u'filters': None, u'resource': {u'fixed_ip_address': None, u'floating_network_id': u'e376dbda-8ce7-40c8-983b-03beec6ae131', u'port_id': None, u'tenant_id': u'3088e9aba97b4f2ea6050275fc890f5c'}})
  496 try:
  497 cfgdb = self._get_user_cfgdb(context)
  498 net_info = cfgdb.floatingip_create(floatingip['resource'])
  499 return net_info
  500 except Exception as e:
net_info undefined
cfgdb = <vnc_openstack.neutron_plugin_db.DBInterface object>
cfgdb.floatingip_create = <bound method DBInterface.floatingip_create of <vnc_openstack.neutron_plugin_db.DBInterface object>>
floatingip = {u'fields': None, u'filters': None, u'resource': {u'fixed_ip_address': None, u'floating_network_id': u'e376dbda-8ce7-40c8-983b-03beec6ae131', u'port_id': None, u'tenant_id': u'3088e9aba97b4f2ea6050275fc890f5c'}}

 /usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py in floatingip_create(self=<vnc_openstack.neutron_plugin_db.DBInterface object>, fip_q={u'fixed_ip_address': None, u'floating_network_id': u'e376dbda-8ce7-40c8-983b-03beec6ae131', u'port_id': None, u'tenant_id': u'3088e9aba97b4f2ea6050275fc890f5c'})
 3256 exc_info = {'type': 'BadRequest', 'message': msg}
 3257 bottle.abort(400, json.dumps(exc_info))
 3258 fip_uuid = self._vnc_lib.floating_ip_create(fip_obj)
 3259 fip_obj = self._vnc_lib.floating_ip_read(id=fip_uuid)
 3260
fip_uuid undefined
self = <vnc_openstack.neutron_plugin_db.DBInterface object>
self._vnc_lib = <vnc_api.vnc_api.VncApi object>
self._vnc_lib.floating_ip_create = <bound method VncApi.floating_ip_create of <vnc_api.vnc_api.VncApi object>>
fip_obj = <vnc_api.gen.resource_client.FloatingIp object>

 /usr/lib/python2.7/dist-packages/vnc_api/gen/vnc_api_client_gen.py in floating_ip_create(self=<vnc_api.vnc_api.VncApi object>, obj=<vnc_api.gen.resource_client.FloatingIp object>)
  994 content = self._request_server(rest.OP_POST,
  995 vnc_api.gen.resource_client.FloatingIp.create_uri,
  996 data = json_body)
  997
  998 floating_ip_dict = json.loads(content)['floating-ip']
data undefined
json_body = '{"floating-ip":{"project_refs": [{"to": ["defaul...refs": [], "floating_ip_fixed_ip_address": null}}'

 /usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py in _request_server(self=<vnc_api.vnc_api.VncApi object>, op=1, url=u'/floating-ips', data='{"floating-ip":{"project_refs": [{"to": ["defaul...refs": [], "floating_ip_fixed_ip_address": null}}', retry_on_error=True, retry_after_authn=False)
  353 continue
  354 else: # Unknown Error
  355 raise HttpError(status, content)
  356 # end while True
  357
global HttpError = <class 'cfgm_common.exceptions.HttpError'>
status = 500
content = u"Virtual-Network([u'default-domain', u'public', u'public_vn']) has exhausted subnet(all)"
<class 'cfgm_common.exceptions.HttpError'>: HTTP Status: 500 Content: Virtual-Network([u'default-domain', u'public', u'public_vn']) has exhausted subnet(all)
    __class__ = <class 'cfgm_common.exceptions.HttpError'>
    __delattr__ = <method-wrapper '__delattr__' of HttpError object>
    __dict__ = {'content': u"Virtual-Network([u'default-domain', u'public', u'public_vn']) has exhausted subnet(all)", 'status_code': 500}
    __doc__ = None
    __format__ = <built-in method __format__ of HttpError object>
    __getattribute__ = <method-wrapper '__getattribute__' of HttpError object>
    __getitem__ = <method-wrapper '__getitem__' of HttpError object>
    __getslice__ = <method-wrapper '__getslice__' of HttpError object>
    __hash__ = <method-wrapper '__hash__' of HttpError object>
    __init__ = <bound method HttpError.__init__ of HttpError()>
    __module__ = 'cfgm_common.exceptions'
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of HttpError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of HttpError object>
    __repr__ = <method-wrapper '__repr__' of HttpError object>
    __setattr__ = <method-wrapper '__setattr__' of HttpError object>
    __setstate__ = <built-in method __setstate__ of HttpError object>
    __sizeof__ = <built-in method __sizeof__ of HttpError object>
    __str__ = <bound method HttpError.__str__ of HttpError()>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __unicode__ = <built-in method __unicode__ of HttpError object>
    __weakref__ = None
    args = ()
    content = u"Virtual-Network([u'default-domain', u'public', u'public_vn']) has exhausted subnet(all)"
    message = ''
    status_code = 500

The above is a description of an error in a Python program. Here is
the original traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py", line 498, in plugin_create_floatingip
    net_info = cfgdb.floatingip_create(floatingip['resource'])
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", line 3258, in floatingip_create
    fip_uuid = self._vnc_lib.floating_ip_create(fip_obj)
  File "/usr/lib/python2.7/dist-packages/vnc_api/gen/vnc_api_client_gen.py", line 996, in floating_ip_create
    data = json_body)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 355, in _request_server
    raise HttpError(status, content)
HttpError: HTTP Status: 500 Content: Virtual-Network([u'default-domain', u'public', u'public_vn']) has exhausted subnet(all)

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bottle.py", line 764, in _handle
    return route.call(**args)
  File "/usr/lib/python2.7/dist-packages/bottle.py", line 1575, in wrapper
    rv = callback(*a, **ka)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py", line 574, in plugin_http_post_floatingip
    return self.plugin_create_floatingip(context, floatingip)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py", line 502, in plugin_create_floatingip
    raise e
HttpError: HTTP Status: 500 Content: Virtual-Network([u'default-domain', u'public', u'public_vn']) has exhausted subnet(all)
10.204.217.108 - - [2014-08-10 12:04:49] "POST /neutron/floatingip HTTP/1.1" 500 156 0.109285

Changed in juniperopenstack:
status: New → Confirmed
Changed in juniperopenstack:
status: Confirmed → In Progress
Revision history for this message
Prakash Bailkeri (prakashmb) wrote :
Changed in juniperopenstack:
status: In Progress → Fix Committed
tags: added: automation
Revision history for this message
Prakash Bailkeri (prakashmb) wrote :
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.