[mainline 2715] contrail-schema crash while deleting network policy
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R3.0 |
Fix Committed
|
High
|
Sachin Bansal | |||
Trunk |
Fix Committed
|
High
|
Sachin Bansal |
Bug Description
<type 'exceptions.
Python 2.7.6: /usr/bin/python
Fri Feb 26 11:09:43 2016
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/
316 res_obj = cls.get(res_id)
317 if res_obj is not None:
318 res_obj.evaluate()
319
320 for vn_id in dependency_
res_obj = <schema_
res_obj.evaluate = <bound method VirtualNetworkS
/usr/lib/
1345 ri = RoutingInstance
1346 if ri:
1347 ri.update_
1348 # end evaluate
1349
ri = <schema_
ri.update_
/usr/lib/
1931 return
1932 sc = ServiceChain.
1933 for si_name in sc.service_list:
1934 if not self.name.
1935 continue
si_name undefined
sc = None
sc.service_list undefined
<type 'exceptions.
__class__ = <type 'exceptions.
__delattr__ = <method-wrapper '__delattr__' of exceptions.
__dict__ = {}
__doc__ = 'Attribute not found.'
__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 has no attribute 'service_list'",)
message = "'NoneType' object has no attribute 'service_list'"
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/
res_
File "/usr/lib/
ri.
File "/usr/lib/
for si_name in sc.service_list:
AttributeError: 'NoneType' object has no attribute 'service_list'
Steps to recreate:
1. Create SI and attaching routing policy to SI
2. Create a network policy to apply the SI
3. Attach to networks
4. Restart contrail-schema
5. Delete the network policy
With this steps you will hit:
Traceback (most recent call last): python2. 7/dist- packages/ schema_ transformer/ to_bgp. py", line 318, in _vnc_subscribe_ callback obj.evaluate( ) python2. 7/dist- packages/ schema_ transformer/ config_ db.py", line 1336, in evaluate chain.destroy( ) python2. 7/dist- packages/ schema_ transformer/ config_ db.py", line 2683, in destroy anceST. delete( service_ name1) python2. 7/dist- packages/ schema_ transformer/ config_ db.py", line 117, in delete delete_ obj() python2. 7/dist- packages/ schema_ transformer/ config_ db.py", line 2250, in delete_obj _vnc_lib. routing_ instance_ delete( id=self. obj.uuid) python2. 7/dist- packages/ vnc_api/ vnc_api. py", line 39, in wrapper python2. 7/dist- packages/ vnc_api/ vnc_api. py", line 512, in _object_delete server( rest.OP_ DELETE, uri) python2. 7/dist- packages/ vnc_api/ vnc_api. py", line 712, in _request_server count=retry_ count) python2. 7/dist- packages/ vnc_api/ vnc_api. py", line 757, in _request content) 10.204. 216.70: 8082/routing- policy/ 4fb1094d- 4135-4552- 9427-fec882c6b6 50']
File "/usr/lib/
res_
File "/usr/lib/
service_
File "/usr/lib/
RoutingInst
File "/usr/lib/
obj.
File "/usr/lib/
DBBaseST.
File "/usr/lib/
return func(self, *args, **kwargs)
File "/usr/lib/
content = self._request_
File "/usr/lib/
retry_
File "/usr/lib/
raise RefsExistError(
RefsExistError: Delete when resource still referred: ['http://
and
Traceback (most recent call last): python2. 7/dist- packages/ schema_ transformer/ to_bgp. py", line 318, in _vnc_subscribe_ callback obj.evaluate( ) python2. 7/dist- packages/ schema_ transformer/ config_ db.py", line 1347, in evaluate update_ routing_ policy_ and_aggregates( ) python2. 7/dist- packages/ schema_ transformer/ config_ db.py", line 1933, in update_ routing_ policy_ and_aggregates
File "/usr/lib/
res_
File "/usr/lib/
ri.
File "/usr/lib/
for si_name in sc.service_list:
AttributeError: 'NoneType' object has no attribute 'service_list'