netns SI not getting launched ( get_virtual_machine_refs() on vmi_obj which is None)

Bug #1383028 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
Ignatious Johnson Christopher
Trunk
Fix Committed
High
Ignatious Johnson Christopher

Bug Description

R1.20 Build 60 Ubuntu Single node Icehouse setup

In this test, port-list with network_id and device_id filter was failing. On debugging, it was seen that the SI was not launched at all

http://anamika.englab.juniper.net:8080/job/Contrail_Tempest/264/testReport/tempest.api.network.test_routers/RoutersTest/test_update_router_set_gateway_gate_smoke_/

root@nodec3:/var/log/contrail# neutron router-list
+--------------------------------------+--------------------+--------------------------------------------------------+
| id | name | external_gateway_info |
+--------------------------------------+--------------------+--------------------------------------------------------+
| 174433e5-6ed2-45a8-9e18-6d2e75ffaf13 | router--1390083012 | {"network_id": "2e16aa6a-99f6-4ffd-bfa5-b9ab02281a80"} |
+--------------------------------------+--------------------+--------------------------------------------------------+
root@nodec3:/var/log/contrail# neutron port-list --network-id=2e16aa6a-99f6-4ffd-bfa5-b9ab02281a80 --device_id=174433e5-6ed2-45a8-9e18-6d2e75ffaf13

root@nodec3:/var/log/contrail#

root@nodec3:/var/log/contrail# neutron router-show 174433e5-6ed2-45a8-9e18-6d2e75ffaf13
+-----------------------+--------------------------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------------------------+
| admin_state_up | False |
| contrail:fq_name | default-domain |
| | RoutersTest-323556789 |
| | router--1390083012 |
| external_gateway_info | {"network_id": "2e16aa6a-99f6-4ffd-bfa5-b9ab02281a80"} |
| id | 174433e5-6ed2-45a8-9e18-6d2e75ffaf13 |
| name | router--1390083012 |
| status | ACTIVE |
| tenant_id | 9649cb3affff4161828f1f91c0389f4a |
+-----------------------+--------------------------------------------------------+
root@nodec3:/var/log/contrail# keystone tenant-list |grep 9649cb3affff4161828f1f91c0389f4a
| 9649cb3affff4161828f1f91c0389f4a | RoutersTest-323556789 | True |
root@nodec3:/var/log/contrail#

root@nodec3:/var/log/contrail# neutron port-list --tenant-id 9649cb3affff4161828f1f91c0389f4a

root@nodec3:/var/log/contrail# ip netns list
root@nodec3:/var/log/contrail#

svc_monitor.err* is full of these :
================

<type 'exceptions.AttributeError'>
Python 2.7.3: /usr/bin/python
Mon Oct 20 01:18:39 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/svc_monitor/svc_monitor.py in launch_timer(monitor=<svc_monitor.svc_monitor.SvcMonitor object>)
  535 gevent.sleep(svc_info.get_vm_health_interval())
  536 try:
  537 timer_callback(monitor)
  538 except Exception:
  539 cgitb_error_log(monitor)
global timer_callback = <function timer_callback>
monitor = <svc_monitor.svc_monitor.SvcMonitor object>

 /usr/lib/python2.7/dist-packages/svc_monitor/svc_monitor.py in timer_callback(monitor=<svc_monitor.svc_monitor.SvcMonitor object>)
  527 if status == 'ERROR':
  528 monitor.logger.log("Relaunch SI %s" % (si_fq_name_str))
  529 monitor._restart_svc(si_fq_name_str)
  530 elif status == 'DELETE':
  531 monitor._cleanup_si(si_fq_name_str)
monitor = <svc_monitor.svc_monitor.SvcMonitor object>
monitor._restart_svc = <bound method SvcMonitor._restart_svc of <svc_monitor.svc_monitor.SvcMonitor object>>
si_fq_name_str = 'default-domain:RoutersTest-323556789:si_174433e5-6ed2-45a8-9e18-6d2e75ffaf13'

 /usr/lib/python2.7/dist-packages/svc_monitor/svc_monitor.py in _restart_svc(self=<svc_monitor.svc_monitor.SvcMonitor object>, si_fq_str='default-domain:RoutersTest-323556789:si_174433e5-6ed2-45a8-9e18-6d2e75ffaf13')
  265 fq_name = st_list[0]['to']
  266 st_obj = self._vnc_lib.service_template_read(fq_name=fq_name)
  267 self._create_svc_instance(st_obj, si_obj)
  268 # end _restart_svc
  269
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.7/dist-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>)
  281 self.vm_manager.create_service(st_obj, si_obj)
  282 elif virt_type == 'network-namespace':
  283 self.netns_manager.create_service(st_obj, si_obj)
  284
  285 def _delete_svc_instance(self, vm_uuid, proj_name,
self = <svc_monitor.svc_monitor.SvcMonitor object>
self.netns_manager = <svc_monitor.instance_manager.NetworkNamespaceManager object>
self.netns_manager.create_service = <bound method NetworkNamespaceManager.create_ser...instance_manager.NetworkNamespaceManager object>>
st_obj = <vnc_api.gen.resource_client.ServiceTemplate object>
si_obj = <vnc_api.gen.resource_client.ServiceInstance object>

 /usr/lib/python2.7/dist-packages/svc_monitor/instance_manager.py in create_service(self=<svc_monitor.instance_manager.NetworkNamespaceManager object>, st_obj=<vnc_api.gen.resource_client.ServiceTemplate object>, si_obj=<vnc_api.gen.resource_client.ServiceInstance object>)
  659 user_visible=user_visible,
  660 ha_mode=si_props.get_ha_mode())
  661 if vmi_obj.get_virtual_machine_refs() is None:
  662 vmi_obj.set_virtual_machine(vm_obj)
  663 self._vnc_lib.virtual_machine_interface_update(vmi_obj)
vmi_obj = None
vmi_obj.get_virtual_machine_refs undefined
builtinNone = None
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'get_virtual_machine_refs'
    __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_virtual_machine_refs'",)
    message = "'NoneType' object has no attribute 'get_virtual_machine_refs'"

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/svc_monitor/svc_monitor.py", line 537, in launch_timer
    timer_callback(monitor)
  File "/usr/lib/python2.7/dist-packages/svc_monitor/svc_monitor.py", line 529, in timer_callback
    monitor._restart_svc(si_fq_name_str)
  File "/usr/lib/python2.7/dist-packages/svc_monitor/svc_monitor.py", line 267, in _restart_svc
    self._create_svc_instance(st_obj, si_obj)
  File "/usr/lib/python2.7/dist-packages/svc_monitor/svc_monitor.py", line 283, in _create_svc_instance
    self.netns_manager.create_service(st_obj, si_obj)
  File "/usr/lib/python2.7/dist-packages/svc_monitor/instance_manager.py", line 661, in create_service
    if vmi_obj.get_virtual_machine_refs() is None:
AttributeError: 'NoneType' object has no attribute 'get_virtual_machine_refs'

Revision history for this message
Rudra Rugge (rrugge) wrote :
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.