← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1521599] Re: py34 unit tests fail randomly for network.test_neutronv2

 

Reviewed:  https://review.openstack.org/313574
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=94b40cf43ca3ab7d85fd15c8fda9baf8ed07f8a1
Submitter: Jenkins
Branch:    master

commit 94b40cf43ca3ab7d85fd15c8fda9baf8ed07f8a1
Author: Markus Zoeller <mzoeller@xxxxxxxxxx>
Date:   Fri May 6 16:16:54 2016 +0200

    Fix TestNeutronv2.test_deallocate_for_instance_2* race failures
    
    The unit tests
        test_deallocate_for_instance_2_with_requested
        test_deallocate_for_instance_2
    in
        nova.tests.unit.network.test_neutronv2.TestNeutronv2
    fail randomly. An example error looks like this:
    
        b'mox3.mox.UnexpectedMethodCallError: Unexpected method call.
        unexpected:- expected:+'
        b"- Client.delete_port('my_portid1') -> None"
        b'? ^'
        b"+ Client.delete_port('my_portid2') -> None"
        b'?
    
    This is due to the mox record with expected the deletion of multiple
    ports on an instance in a specific order. This order is not important
    though and also not the same in each test case execution. To make it
    explicit in the test case, that the order is *not* important, I've
    chosen to define that in the mock records with "InAnyOrder()".
    
    Another solution could have been to ensure the order of the port IDs
    through the unit tests, but that could be interpreted as a precondition
    for the functional code to work correctly, which is a wrong assumption
    and therefore not chosen for this fix.
    
    Closes-Bug: 1521599
    
    Change-Id: I6ee4512d221aed48ee56f6cca19744f20f70cbe0


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1521599

Title:
  py34 unit tests fail randomly for network.test_neutronv2

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Description
  ===========
  The following unit tests fail **randomly** in the "gate-nova-python34" check queue:
  * nova.tests.unit.network.test_neutronv2.TestNeutronv2.test_deallocate_for_instance_2_with_requested
  * nova.tests.unit.network.test_neutronv2.TestNeutronv2.test_deallocate_for_instance_2
  At least I don't see the root cause for this.

  Steps to reproduce
  ==================
  I discovered this with this review https://review.openstack.org/#/c/250907/3

  Expected result
  ===============
  The "gate-nova-python34" check should pass the neutron tests as the review doesn't contain any network related changes.

  Actual result
  =============
  b'mox3.mox.ExpectedMethodCallsError: Verify: Expected methods never called:'
  b"  0.  Client.delete_port('my_portid1') -> None"

  and

  b'mox3.mox.UnexpectedMethodCallError: Unexpected method call.  unexpected:-  expected:+'
  b"- Client.delete_port('my_portid1') -> None"
  b'?                              ^'
  b"+ Client.delete_port('my_portid2') -> None"
  b'?

  see http://paste.openstack.org/show/480490/

  The logstash query shows a few hits since 2015-11-23 (see below)

  Environment
  ===========
  * Master code (Mitaka cycle)
  * gate-nova-python34
  * https://review.openstack.org/#/c/250907/3

  Logs
  ====
  * http://logs.openstack.org/07/250907/3/check/gate-nova-python34/d73accd/console.html
  * http://logstash.openstack.org/#dashboard/file/logstash.json?query=+message:%5C%22Client.delete_port('my_portid1')%5C%22%20+project:%5C%22openstack/nova%5C%22
    (use the time filter from 2015-11-20 until 2015-12-01)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1521599/+subscriptions


References