router-list and show operations fail on icehouse

Bug #1367227 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
Atul Moghe
Trunk
Fix Committed
High
Atul Moghe

Bug Description

R1.10 34

On icehouse, router-list and show operations fail

contrail-api-0.log:
================
127.0.0.1 - - [2014-09-09 16:03:22] "GET /logical-routers?count=False&detail=False HTTP/1.1" 200 1216 0.003223
ERROR:vnc_cfg_api_server.vnc_cfg_api_server:Exception in REST api handler:
<type 'exceptions.TypeError'>
Python 2.7.3: /usr/bin/python
Tue Sep 9 16:03:22 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_cfg_api_server/vnc_cfg_api_server.py in handler_trap_exception(*args=(), **kwargs={'id': 'b16e13d3-43a1-4918-8a08-7eb25544ae6a'})
  450 trace = self._generate_rest_api_request_trace()
  451 try:
  452 response = handler(*args, **kwargs)
  453 self._generate_rest_api_response_trace(trace, response)
  454 return response
response undefined
handler = <bound method VncApiServer.logical_router_http_g...i_server.vnc_cfg_api_server.VncApiServer object>>
args = ()
kwargs = {'id': 'b16e13d3-43a1-4918-8a08-7eb25544ae6a'}

 /usr/lib/python2.7/dist-packages/vnc_cfg_api_server/gen/vnc_api_server_gen.py in logical_router_http_get(self=<vnc_cfg_api_server.vnc_cfg_api_server.VncApiServer object>, id='b16e13d3-43a1-4918-8a08-7eb25544ae6a')
18277 abort(404, 'No logical-router object found for id %s' %(id))
18278 # common handling for all resource get
18279 (ok, result) = self._get_common(request, id)
18280 if not ok:
18281 (code, msg) = result
ok undefined
result undefined
self = <vnc_cfg_api_server.vnc_cfg_api_server.VncApiServer object>
self._get_common = <bound method VncApiServer._http_get_common of <...i_server.vnc_cfg_api_server.VncApiServer object>>
global request = <LocalRequest: GET http://0.0.0.0:9100/logical-r...e6a?exclude_back_refs=True&exclude_children=True>
id = 'b16e13d3-43a1-4918-8a08-7eb25544ae6a'

 /usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_api_server.py in _http_get_common(self=<vnc_cfg_api_server.vnc_cfg_api_server.VncApiServer object>, request=<LocalRequest: GET http://0.0.0.0:9100/logical-r...e6a?exclude_back_refs=True&exclude_children=True>, uuid='b16e13d3-43a1-4918-8a08-7eb25544ae6a')
 1158 return ok, result
 1159 else:
 1160 return self._permissions.check_perms_read(request, uuid)
 1161
 1162 return (True, '')
self = <vnc_cfg_api_server.vnc_cfg_api_server.VncApiServer object>
self._permissions = <vnc_cfg_api_server.vnc_perms.VncPermissions object>
self._permissions.check_perms_read = <bound method VncPermissions.check_perms_read of..._cfg_api_server.vnc_perms.VncPermissions object>>
request = <LocalRequest: GET http://0.0.0.0:9100/logical-r...e6a?exclude_back_refs=True&exclude_children=True>
uuid = 'b16e13d3-43a1-4918-8a08-7eb25544ae6a'

 /usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_perms.py in check_perms_read(self=<vnc_cfg_api_server.vnc_perms.VncPermissions object>, request=<LocalRequest: GET http://0.0.0.0:9100/logical-r...e6a?exclude_back_refs=True&exclude_children=True>, id='b16e13d3-43a1-4918-8a08-7eb25544ae6a')
  103 return (True, '')
  104
  105 return self.validate_perms(request, id, PERMS_R)
  106 # end check_perms_read
  107
self = <vnc_cfg_api_server.vnc_perms.VncPermissions object>
self.validate_perms = <bound method VncPermissions.validate_perms of <vnc_cfg_api_server.vnc_perms.VncPermissions object>>
request = <LocalRequest: GET http://0.0.0.0:9100/logical-r...e6a?exclude_back_refs=True&exclude_children=True>
id = 'b16e13d3-43a1-4918-8a08-7eb25544ae6a'
global PERMS_R = 4

 /usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_perms.py in validate_perms(self=<vnc_cfg_api_server.vnc_perms.VncPermissions object>, request=<LocalRequest: GET http://0.0.0.0:9100/logical-r...e6a?exclude_back_refs=True&exclude_children=True>, uuid='b16e13d3-43a1-4918-8a08-7eb25544ae6a', mode=4)
   34 is_admin = 'admin' in [x.lower() for x in roles]
   35
   36 owner = id_perms['permissions']['owner']
   37 group = id_perms['permissions']['group']
   38 perms = id_perms['permissions']['owner_access'] << 6 | \
owner undefined
id_perms = {u'created': None, u'description': None, u'enable': False, u'last_modified': u'2014-09-09T09:47:52.317918', u'permissions': None, u'uuid': None}
<type 'exceptions.TypeError'>: 'NoneType' object has no attribute '__getitem__'
    __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 = ("'NoneType' object has no attribute '__getitem__'",)
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 1625, in wrapper
    rv = callback(*a, **ka)
  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_cfg_api_server/vnc_cfg_api_server.py", line 452, in handler_trap_exception
    response = handler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/gen/vnc_api_server_gen.py", line 18279, in logical_router_http_get
    (ok, result) = self._get_common(request, id)
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_api_server.py", line 1160, in _http_get_common
    return self._permissions.check_perms_read(request, uuid)
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_perms.py", line 105, in check_perms_read
    return self.validate_perms(request, id, PERMS_R)
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_perms.py", line 36, in validate_perms
    owner = id_perms['permissions']['owner']
TypeError: 'NoneType' object has no attribute '__getitem__'
127.0.0.1 - - [2014-09-09 16:03:22] "GET /logical-router/b16e13d3-43a1-4918-8a08-7eb25544ae6a?exclude_back_refs=True&exclude_children=True HTTP/1.1" 500 156 0.007037

---------------------------

For router-list :

Python 2.7.3: /usr/bin/python
Tue Sep 9 16:03:22 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_get_routers(self=<vnc_openstack.neutron_plugin_interface.NeutronPluginInterface object>, context={u'is_admin': True, u'operation': u'READALL', u'roles': [u'KeystoneServiceAdmin', u'KeystoneAdmin', u'admin'], u'tenant': u'75b706c78d6a4834b145caa5c7ea2192', u'tenant_id': u'75b706c78d6a4834b145caa5c7ea2192', u'type': u'router', u'user_id': u'78cbc891f04d44bd858deb9f47492602'}, router={u'fields': [], u'filters': {}})
  811 try:
  812 cfgdb = self._get_user_cfgdb(context)
  813 routers_info = cfgdb.router_list(context, filters)
  814 return json.dumps(routers_info)
  815 except Exception as e:
routers_info undefined
cfgdb = <vnc_openstack.neutron_plugin_db.DBInterface object>
cfgdb.router_list = <bound method DBInterface.router_list of <vnc_openstack.neutron_plugin_db.DBInterface object>>
context = {u'is_admin': True, u'operation': u'READALL', u'roles': [u'KeystoneServiceAdmin', u'KeystoneAdmin', u'admin'], u'tenant': u'75b706c78d6a4834b145caa5c7ea2192', u'tenant_id': u'75b706c78d6a4834b145caa5c7ea2192', u'type': u'router', u'user_id': u'78cbc891f04d44bd858deb9f47492602'}
filters = {}

 /usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py in router_list(self=<vnc_openstack.neutron_plugin_db.DBInterface object>, context={u'is_admin': True, u'operation': u'READALL', u'roles': [u'KeystoneServiceAdmin', u'KeystoneAdmin', u'admin'], u'tenant': u'75b706c78d6a4834b145caa5c7ea2192', u'tenant_id': u'75b706c78d6a4834b145caa5c7ea2192', u'type': u'router', u'user_id': u'78cbc891f04d44bd858deb9f47492602'}, filters={})
 3383 continue
 3384 try:
 3385 rtr_obj = self._logical_router_read(proj_rtr['uuid'])
 3386 if not self._filters_is_present(
 3387 filters, 'name',
rtr_obj undefined
self = <vnc_openstack.neutron_plugin_db.DBInterface object>
self._logical_router_read = <bound method DBInterface._logical_router_read o..._openstack.neutron_plugin_db.DBInterface object>>
proj_rtr = {u'fq_name': [u'default-domain', u'FloatingIPTestJSON-1993348913', u'router--1468074907'], u'href': u'http://0.0.0.0:9100/logical-router/b16e13d3-43a1-4918-8a08-7eb25544ae6a', u'uuid': u'b16e13d3-43a1-4918-8a08-7eb25544ae6a'}

 /usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py in _logical_router_read(self=<vnc_openstack.neutron_plugin_db.DBInterface object>, rtr_id=u'b16e13d3-43a1-4918-8a08-7eb25544ae6a', fq_name=None)
  932 raise KeyError
  933 except KeyError:
  934 rtr_obj = self._vnc_lib.logical_router_read(id=rtr_id)
  935 fq_name_str = json.dumps(rtr_obj.get_fq_name())
  936 self._db_cache['vnc_routers'][rtr_id] = rtr_obj
rtr_obj undefined
self = <vnc_openstack.neutron_plugin_db.DBInterface object>
self._vnc_lib = <vnc_api.vnc_api.VncApi object>
self._vnc_lib.logical_router_read = <bound method VncApi.logical_router_read of <vnc_api.vnc_api.VncApi object>>
builtinid = <built-in function id>
rtr_id = u'b16e13d3-43a1-4918-8a08-7eb25544ae6a'

 /usr/lib/python2.7/dist-packages/vnc_api/gen/vnc_api_client_gen.py in logical_router_read(self=<vnc_api.vnc_api.VncApi object>, fq_name=None, fq_name_str=None, id=u'b16e13d3-43a1-4918-8a08-7eb25544ae6a', ifmap_id=None, fields=None)
 5640 query_params = {'exclude_back_refs':True,
 5641 'exclude_children':True,}
 5642 content = self._request_server(rest.OP_GET, uri, query_params)
 5643
 5644 obj_dict = json.loads(content)['logical-router']
content undefined
self = <vnc_api.vnc_api.VncApi object>
self._request_server = <bound method VncApi._request_server of <vnc_api.vnc_api.VncApi object>>
global rest = <module 'cfgm_common.rest' from '/usr/lib/python2.7/dist-packages/cfgm_common/rest.pyc'>
rest.OP_GET = 2
uri = u'/logical-router/b16e13d3-43a1-4918-8a08-7eb25544ae6a'
query_params = {'exclude_back_refs': True, 'exclude_children': True}

 /usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py in _request_server(self=<vnc_api.vnc_api.VncApi object>, op=2, url=u'/logical-router/b16e13d3-43a1-4918-8a08-7eb25544ae6a', data={'exclude_back_refs': True, 'exclude_children': True}, retry_on_error=True, retry_after_authn=False)
  365 continue
  366 else: # Unknown Error
  367 raise HttpError(status, content)
  368 # end while True
  369
global HttpError = <class 'cfgm_common.exceptions.HttpError'>
status = 500
content = u'Internal Server Error'
<class 'cfgm_common.exceptions.HttpError'>: HTTP Status: 500 Content: Internal Server Error
    __class__ = <class 'cfgm_common.exceptions.HttpError'>
    __delattr__ = <method-wrapper '__delattr__' of HttpError object>
    __dict__ = {'content': u'Internal Server Error', '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'Internal Server Error'
    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 813, in plugin_get_routers
    routers_info = cfgdb.router_list(context, filters)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", line 3385, in router_list
    rtr_obj = self._logical_router_read(proj_rtr['uuid'])
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", line 934, in _logical_router_read
    rtr_obj = self._vnc_lib.logical_router_read(id=rtr_id)
  File "/usr/lib/python2.7/dist-packages/vnc_api/gen/vnc_api_client_gen.py", line 5642, in logical_router_read
    content = self._request_server(rest.OP_GET, uri, query_params)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 367, in _request_server
    raise HttpError(status, content)
HttpError: HTTP Status: 500 Content: Internal Server Error
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 1625, in wrapper
    rv = callback(*a, **ka)
  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 888, in plugin_http_post_router
    return self.plugin_get_routers(context, router)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py", line 817, in plugin_get_routers
    raise e
HttpError: HTTP Status: 500 Content: Internal Server Error
10.204.216.30 - - [2014-09-09 16:03:22] "POST /neutron/router HTTP/1.1" 500 156 0.024969

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.