During tempest run on centos/icehouse, adding interface to router failed
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R1.1 |
Fix Committed
|
High
|
Sachin Bansal | |||
Trunk |
Fix Committed
|
High
|
Sachin Bansal |
Bug Description
R1.10 Build 38
Was seen when running below tempest cases (test_floating_
http://
2014-09-24 10:57:49.080 903 INFO tempest.
2014-09-24 10:57:49.242 903 INFO tempest.
2014-09-24 10:57:49.269 903 INFO tempest.
2014-09-24 10:57:49.353 903 INFO tempest.
2014-09-24 10:57:49.466 903 INFO tempest.
2014-09-24 10:57:49.468 903 INFO tempest.
credentials: {'username': u'FloatingIPTes
2014-09-24 10:57:49.469 903 INFO tempest.
credentials: {'username': u'FloatingIPTes
2014-09-24 10:57:49.586 903 INFO tempest.
2014-09-24 10:57:50.420 903 INFO tempest.
2014-09-24 10:57:51.014 903 INFO tempest.
2014-09-24 10:57:51.562 903 INFO tempest.
2014-09-24 10:57:51.614 903 INFO tempest.
2014-09-24 10:57:51.615 903 ERROR tempest.test [-] setUpClass failed: Got server fault
Details: {"NeutronError": "Request Failed: internal server error while processing your request."}
2014-09-24 10:57:51.615 903 TRACE tempest.test Traceback (most recent call last):
2014-09-24 10:57:51.615 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.615 903 TRACE tempest.test f(cls)
2014-09-24 10:57:51.615 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.615 903 TRACE tempest.test cls.create_
2014-09-24 10:57:51.615 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.615 903 TRACE tempest.test router_id, subnet_id)
2014-09-24 10:57:51.615 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.615 903 TRACE tempest.test resp, body = self.put(uri, update_body)
2014-09-24 10:57:51.615 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.615 903 TRACE tempest.test return self.rest_
2014-09-24 10:57:51.615 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.615 903 TRACE tempest.test return self.request('PUT', url, extra_headers, headers, body)
2014-09-24 10:57:51.615 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.615 903 TRACE tempest.test resp, resp_body)
2014-09-24 10:57:51.615 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.615 903 TRACE tempest.test raise exceptions.
2014-09-24 10:57:51.615 903 TRACE tempest.test ServerFault: Got server fault
2014-09-24 10:57:51.615 903 TRACE tempest.test Details: {"NeutronError": "Request Failed: internal server error while processing your request."}
2014-09-24 10:57:51.615 903 TRACE tempest.test
2014-09-24 10:57:51.679 903 INFO tempest.
2014-09-24 10:57:51.679 903 ERROR tempest.test [-] tearDownClass failed: Got server fault
Details: {"NeutronError": "Request Failed: internal server error while processing your request."}
2014-09-24 10:57:51.679 903 TRACE tempest.test Traceback (most recent call last):
2014-09-24 10:57:51.679 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.679 903 TRACE tempest.test cls.tearDownClass()
2014-09-24 10:57:51.679 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.679 903 TRACE tempest.test cls.delete_
2014-09-24 10:57:51.679 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.679 903 TRACE tempest.test resp, body = cls.client.
2014-09-24 10:57:51.679 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.679 903 TRACE tempest.test resp, body = self.get(uri)
2014-09-24 10:57:51.679 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.679 903 TRACE tempest.test return self.rest_
2014-09-24 10:57:51.679 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.679 903 TRACE tempest.test return self.request('GET', url, extra_headers, headers)
2014-09-24 10:57:51.679 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.679 903 TRACE tempest.test resp, resp_body)
2014-09-24 10:57:51.679 903 TRACE tempest.test File "/home/
2014-09-24 10:57:51.679 903 TRACE tempest.test raise exceptions.
2014-09-24 10:57:51.679 903 TRACE tempest.test ServerFault: Got server fault
2014-09-24 10:57:51.679 903 TRACE tempest.test Details: {"NeutronError": "Request Failed: internal server error while processing your request."}
2014-09-24 10:57:51.679 903 TRACE tempest.test
contrail-api-0.log :
=================
10.204.217.146 - - [2014-09-23 22:28:33] "GET /service-
ERROR:vnc_
<type 'exceptions.
Python 2.6.6: /usr/bin/python
Tue Sep 23 22:28:33 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/
458 trace = self._generate_
459 try:
460 response = handler(*args, **kwargs)
461 self._generate_
462 return response
response undefined
handler = <bound method VncApiServer.
args = ()
kwargs = {'id': '456358cf-
/usr/lib/
18277 abort(404, 'No logical-router object found for id %s' %(id))
18278 # common handling for all resource get
18279 (ok, result) = self._get_
18280 if not ok:
18281 (code, msg) = result
ok undefined
result undefined
self = <vnc_cfg_
self._get_common = <bound method VncApiServer.
global request = <LocalRequest: GET http://
id = '456358cf-
/usr/lib/
1166 return ok, result
1167 else:
1168 return self._permissio
1169
1170 return (True, '')
self = <vnc_cfg_
self._permissions = <vnc_cfg_
self._permissio
request = <LocalRequest: GET http://
uuid = '456358cf-
/usr/lib/
103 return (True, '')
104
105 return self.validate_
106 # end check_perms_read
107
self = <vnc_cfg_
self.validate_perms = <bound method VncPermissions.
request = <LocalRequest: GET http://
id = '456358cf-
global PERMS_R = 4
/usr/lib/
34 is_admin = 'admin' in [x.lower() for x in roles]
35
36 owner = id_perms[
37 group = id_perms[
38 perms = id_perms[
owner undefined
id_perms = {u'created': None, u'description': None, u'enable': False, u'last_modified': u'2014-
<type 'exceptions.
__class__ = <type 'exceptions.
__delattr__ = <method-wrapper '__delattr__' of exceptions.
__dict__ = {}
__doc__ = 'Inappropriate argument type.'
__format__ = <built-in method __format__ of exceptions.
__getattrib
__getitem__ = <method-wrapper '__getitem__' of exceptions.
__getslice__ = <method-wrapper '__getslice__' of exceptions.
__hash__ = <method-wrapper '__hash__' of exceptions.
__init__ = <method-wrapper '__init__' of exceptions.
__new__ = <built-in method __new__ of type object>
__reduce__ = <built-in method __reduce__ of exceptions.
__reduce_ex__ = <built-in method __reduce_ex__ of exceptions.
__repr__ = <method-wrapper '__repr__' of exceptions.
__setattr__ = <method-wrapper '__setattr__' of exceptions.
__setstate__ = <built-in method __setstate__ of exceptions.
__sizeof__ = <built-in method __sizeof__ of exceptions.
__str__ = <method-wrapper '__str__' of exceptions.
__subclassh
__unicode__ = <built-in method __unicode__ of exceptions.
args = ("'NoneType' object is unsubscriptable",)
message = "'NoneType' object is unsubscriptable"
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/
response = handler(*args, **kwargs)
File "/usr/lib/
(ok, result) = self._get_
File "/usr/lib/
return self._permissio
File "/usr/lib/
return self.validate_
File "/usr/lib/
owner = id_perms[
TypeError: 'NoneType' object is unsubscriptable
Traceback (most recent call last):
File "/usr/lib/
return route.call(**args)
File "/usr/lib/
rv = callback(*a, **ka)
File "/usr/lib/
rv = callback(*a, **ka)
File "/usr/lib/
response = handler(*args, **kwargs)
File "/usr/lib/
(ok, result) = self._get_
File "/usr/lib/
return self._permissio
File "/usr/lib/
return self.validate_
File "/usr/lib/
owner = id_perms[
TypeError: 'NoneType' object is unsubscriptable
127.0.0.1 - - [2014-09-23 22:28:33] "GET /logical-
<class 'cfgm_common.
Python 2.6.6: /usr/bin/python
Tue Sep 23 22:28:33 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/
754 try:
755 cfgdb = self._get_
756 router_info = cfgdb.router_
757 return router_info
758 except Exception as e:
router_info undefined
cfgdb = <vnc_openstack.
cfgdb.router_read = <bound method DBInterface.
router = {u'fields': None, u'filters': None, u'id': u'456358cf-
/usr/lib/
3309
3310 try:
3311 rtr_obj = self._logical_
3312 except NoIdError:
3313 self._raise_
rtr_obj undefined
self = <vnc_openstack.
self._logical_
rtr_uuid = u'456358cf-
/usr/lib/
934 raise KeyError
935 except KeyError:
936 rtr_obj = self._vnc_
937 fq_name_str = json.dumps(
938 self._db_
rtr_obj undefined
self = <vnc_openstack.
self._vnc_lib = <vnc_api.
self._vnc_
builtinid = <built-in function id>
rtr_id = u'456358cf-
/usr/lib/
5640 query_params = {'exclude_
5641 'exclude_
5642 content = self._request_
5643
5644 obj_dict = json.loads(
content undefined
self = <vnc_api.
self._request_
global rest = <module 'cfgm_common.rest' from '/usr/lib/
rest.OP_GET = 2
uri = u'/logical-
query_params = {'exclude_
/usr/lib/
371 continue
372 else: # Unknown Error
373 raise HttpError(status, content)
374 # end while True
375
global HttpError = <class 'cfgm_common.
status = 500
content = u'Internal Server Error'
<class 'cfgm_common.
__class__ = <class 'cfgm_common.
__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>
__getattrib
__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.
__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()>
__subclassh
__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/
router_info = cfgdb.router_
File "/usr/lib/
rtr_obj = self._logical_
rtr_obj = self._logical_
File "/usr/lib/
rtr_obj = self._vnc_
File "/usr/lib/
content = self._request_
File "/usr/lib/
raise HttpError(status, content)
HttpError: HTTP Status: 500 Content: Internal Server Error
Traceback (most recent call last):
File "/usr/lib/
return route.call(**args)
File "/usr/lib/
rv = callback(*a, **ka)
File "/usr/lib/
rv = callback(*a, **ka)
File "/usr/lib/
return self.plugin_
File "/usr/lib/
raise e
HttpError: HTTP Status: 500 Content: Internal Server Error
10.204.217.147 - - [2014-09-23 22:28:33] "POST /neutron/router HTTP/1.1" 500 156 0.029974
+++ read 5d9a646e-
-==========
neutron/server.log:
2014-09-23 22:28:33.791 INFO [neutron.wsgi] 10.204.
2014-09-23 22:28:33.799 INFO [neutron.wsgi] (13661) accepted ('10.204.217.147', 55426)
2014-09-23 22:28:33.808 INFO [urllib3.
2014-09-23 22:28:33.841 ERROR [neutron.
Traceback (most recent call last):
File "/usr/lib/
result = method(
File "/usr/lib/
resource = self._item(request, id, True)
File "/usr/lib/
obj = obj_getter(
File "/usr/lib/
return self._get_
File "/usr/lib/
fields=fields, obj_name=res_type)
File "/usr/lib/
self.
File "/usr/lib/
error_class = CONTRAIL_
KeyError: 500
2014-09-23 22:28:33.843 INFO [neutron.wsgi] 10.204.
Reviewed: https:/ /review. opencontrail. org/3223 github. org/Juniper/ contrail- controller/ commit/ f1342cfddd940e8 5c08d763d935db1 2f7aa66d91
Committed: http://
Submitter: Zuul
Branch: R1.10
commit f1342cfddd940e8 5c08d763d935db1 2f7aa66d91
Author: Sachin Bansal <email address hidden>
Date: Fri Sep 26 15:48:25 2014 -0700
During router create, if we are also updating external gateway, we were updating the logical_router object without reading it. This could clobber the id_perms on the server. We should read before updating the object. Ideally, we should protect against this in api server.
Change-Id: I529b7f9e0b2ab3 b635809af8678ad dc34467422c
Closes-Bug: 1373257