neutron router delete is failing

Bug #1347123 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
High
Sachin Bansal

Bug Description

Build 1.10 2261

Created a router rtr1 and deleted it. deletion fails.

# neutron router-delete rtr1
Request Failed: internal server error while processing your request.
#

root@nodec22:/usr/lib/python2.7/dist-packages/neutronclient# neutron router-list
+--------------------------------------+------+-----------------------+
| id | name | external_gateway_info |
+--------------------------------------+------+-----------------------+
| 97796868-4763-4006-a1de-a8f2ab5e6817 | rtr1 | null |
+--------------------------------------+------+-----------------------+
root@nodec22:/usr/lib/python2.7/dist-packages/neutronclient#

contrail-api.log :
==============
<type 'exceptions.TypeError'>
Python 2.7.3: /usr/bin/python
Tue Jul 22 12:27:43 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_delete_router(self=<vnc_openstack.neutron_plugin_interface.NeutronPluginInterface object>, context={u'is_admin': True, u'operation': u'DELETE', u'roles': [u'admin', u'KeystoneServiceAdmin', u'KeystoneAdmin'], u'tenant': u'd7573cca36ab40b88b3e5859924b5c58', u'tenant_id': u'd7573cca36ab40b88b3e5859924b5c58', u'type': u'router', u'user_id': u'1bfd74757d734632a4329ced0310047c'}, router={u'fields': None, u'filters': None, u'id': u'97796868-4763-4006-a1de-a8f2ab5e6817'})
  753 try:
  754 cfgdb = self._get_user_cfgdb(context)
  755 cfgdb.router_delete(router['id'])
  756 LOG.debug("plugin_delete_router(): " +
  757 pformat(router['id']))
cfgdb = <vnc_openstack.neutron_plugin_db.DBInterface object>
cfgdb.router_delete = <bound method DBInterface.router_delete of <vnc_openstack.neutron_plugin_db.DBInterface object>>
router = {u'fields': None, u'filters': None, u'id': u'97796868-4763-4006-a1de-a8f2ab5e6817'}

 /usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py in router_delete(self=<vnc_openstack.neutron_plugin_db.DBInterface object>, rtr_id=u'97796868-4763-4006-a1de-a8f2ab5e6817')
 2877 self._raise_contrail_exception(404, RouterNotFound(router_id=rtr_id))
 2878
 2879 self._router_set_external_gateway(rtr_id)
 2880 self._logical_router_delete(rtr_id=rtr_id)
 2881 try:
self = <vnc_openstack.neutron_plugin_db.DBInterface object>
self._router_set_external_gateway = <bound method DBInterface._router_set_external_g..._openstack.neutron_plugin_db.DBInterface object>>
rtr_id = u'97796868-4763-4006-a1de-a8f2ab5e6817'
<type 'exceptions.TypeError'>: _router_set_external_gateway() takes exactly 3 arguments (2 given)
    __class__ = <type 'exceptions.TypeError'>
    __delattr__ = <method-wrapper '__delattr__' of exceptions.TypeError object>
    __dict__ = {}
    __doc__ = 'Inappropriate argument type.'
    __format__ = <built-in method __format__ of exceptions.TypeError object>
    __getattribute__ = <method-wrapper '__getattribute__' of exceptions.TypeError object>
    __getitem__ = <method-wrapper '__getitem__' of exceptions.TypeError object>
    __getslice__ = <method-wrapper '__getslice__' of exceptions.TypeError object>
    __hash__ = <method-wrapper '__hash__' of exceptions.TypeError object>
    __init__ = <method-wrapper '__init__' of exceptions.TypeError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of exceptions.TypeError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of exceptions.TypeError object>
    __repr__ = <method-wrapper '__repr__' of exceptions.TypeError object>
    __setattr__ = <method-wrapper '__setattr__' of exceptions.TypeError object>
    __setstate__ = <built-in method __setstate__ of exceptions.TypeError object>
    __sizeof__ = <built-in method __sizeof__ of exceptions.TypeError object>
    __str__ = <method-wrapper '__str__' of exceptions.TypeError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __unicode__ = <built-in method __unicode__ of exceptions.TypeError object>
    args = ('_router_set_external_gateway() takes exactly 3 arguments (2 given)',)
    message = '_router_set_external_gateway() takes exactly 3 arguments (2 given)'

 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 755, in plugin_delete_router
    cfgdb.router_delete(router['id'])
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", line 2879, in router_delete
    self._router_set_external_gateway(rtr_id)
TypeError: _router_set_external_gateway() takes exactly 3 arguments (2 given)

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 845, in plugin_http_post_router
    return self.plugin_delete_router(context, router)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py", line 760, in plugin_delete_router
    raise e
TypeError: _router_set_external_gateway() takes exactly 3 arguments (2 given)
10.204.217.7 - - [2014-07-22 12:27:43] "POST /neutron/router HTTP/1.1" 500 156 0.013791

Tags: config
Sachin Bansal (sbansal)
Changed in juniperopenstack:
assignee: Sachin Bansal (bansalsachin) → Édouard Thuleau (ethuleau)
Sachin Bansal (sbansal)
Changed in juniperopenstack:
assignee: Édouard Thuleau (ethuleau) → Sachin Bansal (bansalsachin)
status: New → In Progress
Revision history for this message
Sachin Bansal (sbansal) wrote :
Changed in juniperopenstack:
status: In Progress → Fix Committed
Revision history for this message
Édouard Thuleau (ethuleau) wrote :

Nice catch!

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.