Sanity: test_vcenter_vm_interface_change fails due to usage of Project_Id

Bug #1666740 reported by Sarath
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Released
Critical
Sarath
R3.1
Fix Released
Critical
Sarath
R3.2
Fix Released
Critical
Sarath
Trunk
Fix Committed
Critical
Sarath

Bug Description

Part of recent fix below the project_id is used and this scenario not applicable to Vcenter-only.
-----------------
In VM Fixture read the VNobj with project_id
Install flavor if it isn't available
Closes-bug: 1634212
Change-Id: I43b0659dabc9ea7c9d09992bf5fc4daf403c1942
commit 86bfe8fd1b415b7ccfb545c3eda453f8c9b3dca8
------------------

The below is the failure of test errors
2017-02-15 14:27:59,572 - DEBUG - VN ctest-net1-73316951 is not present in Agent 10.204.216.181
2017-02-15 14:27:59,580 - DEBUG - VN ctest-net1-73316951 is not present in Agent 10.204.216.182
2017-02-15 14:27:59,587 - DEBUG - VN ctest-net1-73316951 is not present in Agent 10.204.216.183
2017-02-15 14:27:59,587 - INFO - Validated that VN ctest-net1-73316951 is not in any agent
2017-02-15 14:27:59,608 - INFO - Validated that Routing instances and Config db in Control-nodes does not have VN ctest-net1-73316951 info
2017-02-15 14:28:07,036 - ERROR - <type 'exceptions.AttributeError'>
Python 2.7.6: /usr/bin/python
Wed Feb 15 14:26:09 2017

A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.

 /contrail-test/tcutils/wrappers.py in wrapper(self=<scripts.vm_regression.test_vcenter.TestVcenter....r_vm_interface_change[vcenter] id=0x7ff81ccd7450>, *args=(), **kwargs={})
   71 log.info('Initial checks done. Running the testcase now')
   72 log.info('')
   73 result = function(self, *args, **kwargs)
   74 except KeyboardInterrupt:
   75 raise
result = None
function = <function test_vcenter_vm_interface_change>
self = <scripts.vm_regression.test_vcenter.TestVcenter....r_vm_interface_change[vcenter] id=0x7ff81ccd7450>
args = ()
kwargs = {}

 /contrail-test/scripts/vm_regression/test_vcenter.py in test_vcenter_vm_interface_change(self=<scripts.vm_regression.test_vcenter.TestVcenter....r_vm_interface_change[vcenter] id=0x7ff81ccd7450>)
  126 "Ping from %s to %s is expected to fail" % (vm2_fixture.vm_name, vm1_fixture.vm_name)
  127 vm1_fixture.orch.change_network_to_vm(vm1_fixture.vm_obj,vn2_fixture.vn_name)
  128 vm1_fixture.read()
  129 assert vm1_fixture.verify_on_setup()
  130 assert vm2_fixture.ping_with_certainty(dst_vm_fixture=vm1_fixture),\
vm1_fixture = <vm_test.VMFixture object>
vm1_fixture.read = <bound method VMFixture.read of <vm_test.VMFixture object>>

 /contrail-test/fixtures/vm_test.py in read(self=<vm_test.VMFixture object>)
  161 self.vn_names = self.orch.get_networks_of_vm(self.vm_obj)
  162 self.vn_objs = [self.orch.get_vn_obj_if_present(x, project_id=self.connections.project_id)
  163 for x in self.vn_names]
  164 self.vn_ids = [self.orch.get_vn_id(x) for x in self.vn_objs]
  165 self.vn_fq_names = [':'.join(self.vnc_lib_h.id_to_fq_name(x))
x = 'ctest-net2-41626313'
self = <vm_test.VMFixture object>
self.vn_names = ['ctest-net2-41626313']
<type 'exceptions.AttributeError'>: ContrailConnections instance has no attribute 'project_id'
    __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 = ("ContrailConnections instance has no attribute 'project_id'",)
    message = "ContrailConnections instance has no attribute 'project_id'"

The above is a description of an error in a Python program. Here is
the original traceback:

Traceback (most recent call last):
  File "tcutils/wrappers.py", line 73, in wrapper
    result = function(self, *args, **kwargs)
  File "scripts/vm_regression/test_vcenter.py", line 128, in test_vcenter_vm_interface_change
    vm1_fixture.read()
  File "/contrail-test/fixtures/vm_test.py", line 163, in read
    for x in self.vn_names]
AttributeError: ContrailConnections instance has no attribute 'project_id'

Revision history for this message
Sarath (nsarath) wrote :

Fix is to call self.orch.get_vn_obj_if_present(x) without project-id when involving scenario Vcenter-only

description: updated
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/29007
Submitter: Sarath (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/29087
Submitter: Sarath (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/29088
Submitter: Sarath (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/29089
Submitter: Sarath (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/29007
Committed: http://github.org/Juniper/contrail-test-ci/commit/4c618bcee14ff4acbcc08394f9453f0c90207863
Submitter: Zuul (<email address hidden>)
Branch: master

commit 4c618bcee14ff4acbcc08394f9453f0c90207863
Author: sarath <email address hidden>
Date: Wed Feb 22 07:04:14 2017 +0530

VM fixture read to handle vmware vcenter-only mode
Closes-Bug:#1666740

Change-Id: I2905faae6b5d4a0e455456ff54158b967b0bbe47

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/29089
Committed: http://github.org/Juniper/contrail-test-ci/commit/4d6634871b22cc9f3c6e30c7247605f6db6c4337
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit 4d6634871b22cc9f3c6e30c7247605f6db6c4337
Author: sarath <email address hidden>
Date: Fri Feb 24 07:02:13 2017 +0530

VM fixture read to handle vmware vcenter-only mode
Closes-Bug:#1666740

Change-Id: Iabd53027ac0750f16d2a0878dc997e057f5b94c9

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/29087
Committed: http://github.org/Juniper/contrail-test-ci/commit/0ce10defb4f1abd23cf27ca558e5b1ff363e80b5
Submitter: Zuul (<email address hidden>)
Branch: R3.0

commit 0ce10defb4f1abd23cf27ca558e5b1ff363e80b5
Author: sarath <email address hidden>
Date: Fri Feb 24 06:57:09 2017 +0530

VM fixture read to handle vmware vcenter-only mode
Closes-Bug:#1666740

Change-Id: I1124815492846f68eaee4ad92a83e7f32773a10c

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/29088
Committed: http://github.org/Juniper/contrail-test-ci/commit/38e300af82ea9bfb68a914e6717623590d5b4e66
Submitter: Zuul (<email address hidden>)
Branch: R3.1

commit 38e300af82ea9bfb68a914e6717623590d5b4e66
Author: sarath <email address hidden>
Date: Fri Feb 24 07:00:06 2017 +0530

VM fixture read to handle vmware vcenter-only mode
Closes-Bug:#1666740

Change-Id: I057c74092809621b289ae290da5c6d4bcf5e7962

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/40095
Submitter: Ankit Jain (<email address hidden>)

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.