> On Jul 8, 2015, at 4:51 AM, sajuptpm <email address hidden> wrote:
>
> Hi sachin,
> My findings:
> Suppose we have 1000 virtual networks. when schema restart, it adds this 1000 virtual networks into current_network_set.
> Then iterate through current_network_set and construct ACL entries and connectivity table, right?
> During this current_network_set iteration, if user delete a virtual network, schema fails to query from Cassandra and end-up with this error.
This should not lead to this crash since any network for which delete hasn’t been received by schema transformer should still be present in VirtualNetworkST and get should succeed. And if schema transformer has already processed delete for this network, it will be removed from current_network_set.
Sachin
>
> --
> You received this bug notification because you are a member of Contrail
> Systems engineering, which is subscribed to Juniper Openstack.
> https://bugs.launchpad.net/bugs/1470984
>
> Title:
> schema_transformer crashes with AttributeError: 'NoneType' object has
> no attribute 'expand_connections'
>
> Status in Juniper Openstack distribution:
> In Progress
> Status in Juniper Openstack trunk series:
> In Progress
> Status in OpenContrail:
> In Progress
>
> Bug description:
> This happense because VirtualNetworkST.get(network_name) returns None.
> Don't know why it returns none, any clue ?
>
> Traceback
> ==========
> <type 'exceptions.AttributeError'>
> Python 2.7.6: /usr/bin/python
> Mon Jun 22 01:13:23 2015
>
> 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/schema_transformer/to_bgp.py in launch_arc(transformer=<schema_transformer.to_bgp.SchemaTransformer object>, ssrc_mapc=<cfgm_common.ifmap.client.client instance>)
> 3651 result = arc_mapc.call('poll', pollreq)
> 3652 try:
> 3653 transformer.process_poll_result(result)
> 3654 except Exception as e:
> 3655 try:
> transformer = <schema_transformer.to_bgp.SchemaTransformer object>
> transformer.process_poll_result = <bound method SchemaTransformer.process_poll_res...ema_transformer.to_bgp.SchemaTransformer object>>
> result = '<?xml version="1.0" encoding="UTF-8" standalone=...lResult></ns2:response></ns3:Body></ns3:Envelope>'
>
> /usr/lib/python2.7/dist-packages/schema_transformer/to_bgp.py in process_poll_result(self=<schema_transformer.to_bgp.SchemaTransformer object>, poll_result_str='<?xml version="1.0" encoding="UTF-8" standalone=...lResult></ns2:response></ns3:Body></ns3:Envelope>')
> 3301 virtual_network = VirtualNetworkST.get(network_name)
> 3302 old_virtual_network_connections =\
> 3303 virtual_network.expand_connections()
> 3304 old_service_chains = virtual_network.service_chains
> 3305 virtual_network.connections = set()
> virtual_network = None
> virtual_network.expand_connections undefined
> <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'expand_connections'
> __class__ = <type 'exceptions.AttributeError'>
> __delattr__ = <method-wrapper '__delattr__' of exceptions.AttributeError object>
> __dict__ = {}
> __doc__ = 'Attribute not found.'
> __format__ = <built-in method __format__ of exceptions.AttributeError object>
> __getattribute__ = <method-wrapper '__getattribute__' of exceptions.AttributeError object>
> __getitem__ = <method-wrapper '__getitem__' of exceptions.AttributeError object>
> __getslice__ = <method-wrapper '__getslice__' of exceptions.AttributeError object>
> __hash__ = <method-wrapper '__hash__' of exceptions.AttributeError object>
> __init__ = <method-wrapper '__init__' of exceptions.AttributeError object>
> __new__ = <built-in method __new__ of type object>
> __reduce__ = <built-in method __reduce__ of exceptions.AttributeError object>
> __reduce_ex__ = <built-in method __reduce_ex__ of exceptions.AttributeError object>
> __repr__ = <method-wrapper '__repr__' of exceptions.AttributeError object>
> __setattr__ = <method-wrapper '__setattr__' of exceptions.AttributeError object>
> __setstate__ = <built-in method __setstate__ of exceptions.AttributeError object>
> __sizeof__ = <built-in method __sizeof__ of exceptions.AttributeError object>
> __str__ = <method-wrapper '__str__' of exceptions.AttributeError object>
> __subclasshook__ = <built-in method __subclasshook__ of type object>
> __unicode__ = <built-in method __unicode__ of exceptions.AttributeError object>
> args = ("'NoneType' object has no attribute 'expand_connections'",)
> message = "'NoneType' object has no attribute 'expand_connections'"
>
> 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/schema_transformer/to_bgp.py", line 3653, in launch_arc
> transformer.process_poll_result(result)
> File "/usr/lib/python2.7/dist-packages/schema_transformer/to_bgp.py", line 3303, in process_poll_result
> virtual_network.expand_connections()
> AttributeError: 'NoneType' object has no attribute 'expand_connections'
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juniperopenstack/+bug/1470984/+subscriptions
> On Jul 8, 2015, at 4:51 AM, sajuptpm <email address hidden> wrote: network_ set.
>
> Hi sachin,
> My findings:
> Suppose we have 1000 virtual networks. when schema restart, it adds this 1000 virtual networks into current_
> Then iterate through current_network_set and construct ACL entries and connectivity table, right?
> During this current_network_set iteration, if user delete a virtual network, schema fails to query from Cassandra and end-up with this error.
This should not lead to this crash since any network for which delete hasn’t been received by schema transformer should still be present in VirtualNetworkST and get should succeed. And if schema transformer has already processed delete for this network, it will be removed from current_ network_ set.
Sachin
> /bugs.launchpad .net/bugs/ 1470984 connections' T.get(network_ name) returns None. AttributeError' > python2. 7/dist- packages/ schema_ transformer/ to_bgp. py in launch_ arc(transformer =<schema_ transformer. to_bgp. SchemaTransform er object>, ssrc_mapc= <cfgm_common. ifmap.client. client instance>) call('poll' , pollreq) process_ poll_result( result) transformer. to_bgp. SchemaTransform er object> process_ poll_result = <bound method SchemaTransform er.process_ poll_res. ..ema_transform er.to_bgp. SchemaTransform er object>> ...lResult> </ns2:response> </ns3:Body> </ns3:Envelope> ' python2. 7/dist- packages/ schema_ transformer/ to_bgp. py in process_ poll_result( self=<schema_ transformer. to_bgp. SchemaTransform er object>, poll_result_ str='<? xml version="1.0" encoding="UTF-8" standalone= ...lResult> </ns2:response> </ns3:Body> </ns3:Envelope> ') T.get(network_ name) network_ connections =\ network. expand_ connections( ) network. service_ chains network. connections = set() network. expand_ connections undefined AttributeError' >: 'NoneType' object has no attribute 'expand_ connections' AttributeError' > AttributeError object> AttributeError object> AttributeError object> AttributeError object> AttributeError object> AttributeError object> AttributeError object> AttributeError object> AttributeError object> AttributeError object> AttributeError object> AttributeError object> AttributeError object> AttributeError object> AttributeError object> connections' ",) connections' " python2. 7/dist- packages/ schema_ transformer/ to_bgp. py", line 3653, in launch_arc process_ poll_result( result) python2. 7/dist- packages/ schema_ transformer/ to_bgp. py", line 3303, in process_poll_result network. expand_ connections( ) connections' /bugs.launchpad .net/juniperope nstack/ +bug/1470984/ +subscriptions
> --
> You received this bug notification because you are a member of Contrail
> Systems engineering, which is subscribed to Juniper Openstack.
> https:/
>
> Title:
> schema_transformer crashes with AttributeError: 'NoneType' object has
> no attribute 'expand_
>
> Status in Juniper Openstack distribution:
> In Progress
> Status in Juniper Openstack trunk series:
> In Progress
> Status in OpenContrail:
> In Progress
>
> Bug description:
> This happense because VirtualNetworkS
> Don't know why it returns none, any clue ?
>
> Traceback
> ==========
> <type 'exceptions.
> Python 2.7.6: /usr/bin/python
> Mon Jun 22 01:13:23 2015
>
> 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/
> 3651 result = arc_mapc.
> 3652 try:
> 3653 transformer.
> 3654 except Exception as e:
> 3655 try:
> transformer = <schema_
> transformer.
> result = '<?xml version="1.0" encoding="UTF-8" standalone=
>
> /usr/lib/
> 3301 virtual_network = VirtualNetworkS
> 3302 old_virtual_
> 3303 virtual_
> 3304 old_service_chains = virtual_
> 3305 virtual_
> virtual_network = None
> virtual_
> <type 'exceptions.
> __class__ = <type 'exceptions.
> __delattr__ = <method-wrapper '__delattr__' of exceptions.
> __dict__ = {}
> __doc__ = 'Attribute not found.'
> __format__ = <built-in method __format__ of exceptions.
> __getattribute__ = <method-wrapper '__getattribute__' of exceptions.
> __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.
> __subclasshook__ = <built-in method __subclasshook__ of type object>
> __unicode__ = <built-in method __unicode__ of exceptions.
> args = ("'NoneType' object has no attribute 'expand_
> message = "'NoneType' object has no attribute 'expand_
>
> 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/
> transformer.
> File "/usr/lib/
> virtual_
> AttributeError: 'NoneType' object has no attribute 'expand_
>
> To manage notifications about this bug go to:
> https:/