Exception due to vmi_obj being None while creating service vm

Bug #1382645 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
High
Rudra Rugge
R2.0
Fix Committed
Undecided
Unassigned

Bug Description

2.0-2397.el6 Ubuntu Icehouse Single node setup

Seen while running parallel sanity tests.

All system logs will be in http://10.204.216.50/Docs/bugs/1382385

<type 'exceptions.AttributeError'>
Python 2.6.6: /usr/bin/python
Fri Oct 17 10:41: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.6/site-packages/svc_monitor/svc_monitor.py in launch_arc(monitor=<svc_monitor.svc_monitor.SvcMonitor object>, ssrc_mapc=<cfgm_common.ifmap.client.client instance>)
  510 pollreq = PollRequest(arc_mapc.get_session_id())
  511 result = arc_mapc.call('poll', pollreq)
  512 monitor.process_poll_result(result)
  513 except exceptions.InvalidSessionID:
  514 cgitb_error_log(monitor)
monitor = <svc_monitor.svc_monitor.SvcMonitor object>
monitor.process_poll_result = <bound method SvcMonitor.process_poll_result of <svc_monitor.svc_monitor.SvcMonitor object>>
result = '<?xml version="1.0" encoding="UTF-8" standalone=...lResult></ns2:response></ns3:Body></ns3:Envelope>'

 /usr/lib/python2.6/site-packages/svc_monitor/svc_monitor.py in process_poll_result(self=<svc_monitor.svc_monitor.SvcMonitor object>, poll_result_str='<?xml version="1.0" encoding="UTF-8" standalone=...lResult></ns2:response></ns3:Body></ns3:Envelope>')
  493 self.logger.log("%s with %s/%s"
  494 % (funcname, meta_name, idents))
  495 func(idents)
  496 # end for meta
  497 # end for result_type
func = <bound method SvcMonitor._addmsg_service_instanc...e of <svc_monitor.svc_monitor.SvcMonitor object>>
idents = {'service-instance': 'default-domain:TestMultiInlineSVC-23847537:multi_sc_trans_0_si-15689723_1', 'service-template': 'default-domain:multi_sc_trans_0_st-46135064'}
 /usr/lib/python2.6/site-packages/svc_monitor/svc_monitor.py in _addmsg_service_instance_service_template(self=<svc_monitor.svc_monitor.SvcMonitor object>, idents={'service-instance': 'default-domain:TestMultiInlineSVC-23847537:multi_sc_trans_0_si-15689723_1', 'service-template': 'default-domain:multi_sc_trans_0_st-46135064'})
  388
  389 #launch VMs
  390 self._create_svc_instance(st_obj, si_obj)
  391 # end _addmsg_service_instance_service_template
  392
self = <svc_monitor.svc_monitor.SvcMonitor object>
self._create_svc_instance = <bound method SvcMonitor._create_svc_instance of <svc_monitor.svc_monitor.SvcMonitor object>>
st_obj = <vnc_api.gen.resource_client.ServiceTemplate object>
si_obj = <vnc_api.gen.resource_client.ServiceInstance object>

 /usr/lib/python2.6/site-packages/svc_monitor/svc_monitor.py in _create_svc_instance(self=<svc_monitor.svc_monitor.SvcMonitor object>, st_obj=<vnc_api.gen.resource_client.ServiceTemplate object>, si_obj=<vnc_api.gen.resource_client.ServiceInstance object>)
  280 virt_type = self._get_virtualization_type(st_props)
  281 if virt_type == 'virtual-machine':
  282 self.vm_manager.create_service(st_obj, si_obj)
  283 elif virt_type == 'network-namespace':
  284 self.netns_manager.create_service(st_obj, si_obj)
self = <svc_monitor.svc_monitor.SvcMonitor object>
self.vm_manager = <svc_monitor.instance_manager.VirtualMachineManager object>
self.vm_manager.create_service = <bound method VirtualMachineManager.create_servi...r.instance_manager.VirtualMachineManager object>>
st_obj = <vnc_api.gen.resource_client.ServiceTemplate object>
si_obj = <vnc_api.gen.resource_client.ServiceInstance object>

 /usr/lib/python2.6/site-packages/svc_monitor/instance_manager.py in create_service(self=<svc_monitor.instance_manager.VirtualMachineManager object>, st_obj=<vnc_api.gen.resource_client.ServiceTemplate object>, si_obj=<vnc_api.gen.resource_client.ServiceInstance object>)
  470 else:
  471 vm = self._create_svc_vm(instance_name, image_name, nics,
  472 flavor, st_obj, si_obj, avail_zone)
  473 if vm is None:
  474 continue
flavor = u'contrail_flavor_2cpu'
st_obj = <vnc_api.gen.resource_client.ServiceTemplate object>
si_obj = <vnc_api.gen.resource_client.ServiceInstance object>
avail_zone = None

 /usr/lib/python2.6/site-packages/svc_monitor/instance_manager.py in _create_svc_vm(self=<svc_monitor.instance_manager.VirtualMachineManager object>, instance_name=u'default-domain__TestMultiInlineSVC-23847537__c5db14e3-7a7e-4bbc-9d27-f2cd1f716db1__1', image_name=u'vsrx-bridge', nics=[{'net-id': u'2aa8f8a4-8a77-4a3e-827b-c5e46fa4eb52', 'shared-ip': False, 'static-route-enable': False, 'static-routes': None, 'type': u'management'}, {'net-id': u'9aa647c8-7738-4a69-86b9-68d73ebed9d3', 'shared-ip': False, 'static-route-enable': False, 'static-routes': None, 'type': u'left'}, {'net-id': u'11e01d31-5ecf-4382-89df-5e6d538cd96c', 'shared-ip': False, 'static-route-enable': False, 'static-routes': None, 'type': u'right'}], flavor_name=u'contrail_flavor_2cpu', st_obj=<vnc_api.gen.resource_client.ServiceTemplate object>, si_obj=<vnc_api.gen.resource_client.ServiceInstance object>, avail_zone=None)
  394 vmi_obj = self._create_svc_vm_port(nic, instance_name,
  395 st_obj, si_obj)
  396 nic_with_port['port-id'] = vmi_obj.get_uuid()
  397 nics_with_port.append(nic_with_port)
  398
nic_with_port = {}
vmi_obj = None
vmi_obj.get_uuid undefined
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'get_uuid'
    __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 'get_uuid'",)
    message = "'NoneType' object has no attribute 'get_uuid'"

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.6/site-packages/svc_monitor/svc_monitor.py", line 512, in launch_arc
    monitor.process_poll_result(result)
  File "/usr/lib/python2.6/site-packages/svc_monitor/svc_monitor.py", line 495, in process_poll_result
    func(idents)
  File "/usr/lib/python2.6/site-packages/svc_monitor/svc_monitor.py", line 390, in _addmsg_service_instance_service_template
    self._create_svc_instance(st_obj, si_obj)
  File "/usr/lib/python2.6/site-packages/svc_monitor/svc_monitor.py", line 282, in _create_svc_instance
    self.vm_manager.create_service(st_obj, si_obj)
  File "/usr/lib/python2.6/site-packages/svc_monitor/instance_manager.py", line 472, in create_service
    flavor, st_obj, si_obj, avail_zone)
  File "/usr/lib/python2.6/site-packages/svc_monitor/instance_manager.py", line 396, in _create_svc_vm
    nic_with_port['port-id'] = vmi_obj.get_uuid()
AttributeError: 'NoneType' object has no attribute 'get_uuid'

tags: added: blocker
Revision history for this message
Rudra Rugge (rrugge) wrote :
Changed in juniperopenstack:
status: New → Fix Committed
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.