schema crash in set_route_target_list ( "next_hop") not defined

Bug #1353237 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
Sachin Bansal
Trunk
Fix Committed
High
Sachin Bansal

Bug Description

Build 1.10 5

Looking at the timing, it seems to have crashed while creating a router-gateway setup with public , private vns.

<type 'exceptions.NameError'>
Python 2.7.3: /usr/bin/python
Tue Aug 5 08:23:17 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/schema_transformer/to_bgp.py in launch_arc(transformer=<schema_transformer.to_bgp.SchemaTransformer object>, ssrc_mapc=<cfgm_common.ifmap.client.client instance>)
 3425 result = arc_mapc.call('poll', pollreq)
 3426 try:
 3427 transformer.process_poll_result(result)
 3428 except Exception as e:
 3429 cgitb.Hook(
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>')
 3061 result_type.split('Result')[0].title(),
 3062 meta_name, idents, meta, funcname)
 3063 func(idents, meta)
 3064 # end for meta
 3065 # end for result_type
func = <bound method SchemaTransformer.add_route_target...ema_transformer.to_bgp.SchemaTransformer object>>
idents = {'virtual-network': 'default-domain:public:public_vn'}
meta = <Element {http://www.contrailsystems.com/vnc_cfg.xsd}route-target-list>

 /usr/lib/python2.7/dist-packages/schema_transformer/to_bgp.py in add_route_target_list(self=<schema_transformer.to_bgp.SchemaTransformer obje
ct>, idents={'virtual-network': 'default-domain:public:public_vn'}, meta=<Element {http://www.contrailsystems.com/vnc_cfg.xsd}route-target-lis
t>)
 2801 rt_list.build(meta)
 2802 vn = VirtualNetworkST.locate(vn_name)
 2803 vn.set_route_target_list(rt_list)
 2804 self.current_network_set.add(vn_name)
 2805 # end add_route_target_list
vn = <schema_transformer.to_bgp.VirtualNetworkST object>
vn.set_route_target_list = <bound method VirtualNetworkST.set_route_target_...hema_transformer.to_bgp.VirtualNetworkST object>>
rt_list = <vnc_api.gen.resource_xsd.RouteTargetList object>

 /usr/lib/python2.7/dist-packages/schema_transformer/to_bgp.py in set_route_target_list(self=<schema_transformer.to_bgp.VirtualNetworkST object>, rt_list=<vnc_api.gen.resource_xsd.RouteTargetList object>)
  657 import_export='export')
  658 for (prefix, nexthop) in self.route_table.items():
  659 left_ri = self._get_routing_instance_from_route(next_hop)
  660 if left_ri is not None:
  661 left_ri.update_route_target_list(rt_add, rt_del,
left_ri undefined
self = <schema_transformer.to_bgp.VirtualNetworkST object>
self._get_routing_instance_from_route = <bound method VirtualNetworkST._get_routing_inst...hema_transformer.to_bgp.VirtualNetworkST object>>
next_hop undefined
<type 'exceptions.NameError'>: global name 'next_hop' is not defined
    __class__ = <type 'exceptions.NameError'>
    __delattr__ = <method-wrapper '__delattr__' of exceptions.NameError object>
    __dict__ = {}
    __doc__ = 'Name not found globally.'
    __format__ = <built-in method __format__ of exceptions.NameError object>
    __getattribute__ = <method-wrapper '__getattribute__' of exceptions.NameError object>
    __getitem__ = <method-wrapper '__getitem__' of exceptions.NameError object>
    __getslice__ = <method-wrapper '__getslice__' of exceptions.NameError object>
    __hash__ = <method-wrapper '__hash__' of exceptions.NameError object>
    __init__ = <method-wrapper '__init__' of exceptions.NameError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of exceptions.NameError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of exceptions.NameError object>
    __repr__ = <method-wrapper '__repr__' of exceptions.NameError object>
    __setattr__ = <method-wrapper '__setattr__' of exceptions.NameError object>
    __setstate__ = <built-in method __setstate__ of exceptions.NameError object>
    __sizeof__ = <built-in method __sizeof__ of exceptions.NameError object>
    __str__ = <method-wrapper '__str__' of exceptions.NameError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __unicode__ = <built-in method __unicode__ of exceptions.NameError object>
    args = ("global name 'next_hop' is not defined",)
    message = "global name 'next_hop' is not defined"

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 3427, in launch_arc
    transformer.process_poll_result(result)
  File "/usr/lib/python2.7/dist-packages/schema_transformer/to_bgp.py", line 3063, in process_poll_result
    func(idents, meta)
  File "/usr/lib/python2.7/dist-packages/schema_transformer/to_bgp.py", line 2803, in add_route_target_list
    vn.set_route_target_list(rt_list)
  File "/usr/lib/python2.7/dist-packages/schema_transformer/to_bgp.py", line 659, in set_route_target_list
    left_ri = self._get_routing_instance_from_route(next_hop)
NameError: global name 'next_hop' is not defined

Tags: config
Revision history for this message
Vedamurthy Joshi (vedujoshi) wrote :
Sachin Bansal (sbansal)
Changed in juniperopenstack:
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
Nagabhushana R (bhushana) wrote :

please check for mainline commit and update.

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.