← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1545177] Re: nova_object.changes compare intermittently fails in py34 unit tests

 

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

commit b8296d82a0792900624efbaf040eff2cd488889b
Author: Dan Smith <dansmith@xxxxxxxxxx>
Date:   Thu Feb 11 11:48:13 2016 -0800

    Add StableObjectJsonFixture and use it in our base test class
    
    This will ensure that our object JSON is stable during unit tests.
    Specifically, the changes field, which is listified from a set, which
    can vary in order.
    
    Closes-Bug: #1545177
    Change-Id: Ib40ca16c41d5422c18f4fc7d658273a8059100ab


** 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/1545177

Title:
  nova_object.changes compare intermittently fails in py34 unit tests

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Seen here:

  http://logs.openstack.org/81/270981/3/check/gate-nova-
  python34/dfbe2a4/console.html#_2016-02-11_23_31_38_797

  2016-02-11 23:31:38.797 | nova.tests.unit.compute.test_compute.ComputeAPITestCase.test_create_with_numa_topology
  2016-02-11 23:31:38.798 | --------------------------------------------------------------------------------------
  2016-02-11 23:31:38.798 | 
  2016-02-11 23:31:38.798 | Captured traceback:
  2016-02-11 23:31:38.798 | ~~~~~~~~~~~~~~~~~~~
  2016-02-11 23:31:38.798 |     b'Traceback (most recent call last):'
  2016-02-11 23:31:38.798 |     b'  File "/home/jenkins/workspace/gate-nova-python34/.tox/py34/lib/python3.4/site-packages/mock/mock.py", line 1305, in patched'
  2016-02-11 23:31:38.798 |     b'    return func(*args, **keywargs)'
  2016-02-11 23:31:38.798 |     b'  File "/home/jenkins/workspace/gate-nova-python34/nova/tests/unit/compute/test_compute.py", line 7656, in test_create_with_numa_topology'
  2016-02-11 23:31:38.799 |     b'    instances[0].numa_topology.cells[0].obj_to_primitive())'
  2016-02-11 23:31:38.799 |     b'  File "/home/jenkins/workspace/gate-nova-python34/.tox/py34/lib/python3.4/site-packages/testtools/testcase.py", line 362, in assertEqual'
  2016-02-11 23:31:38.799 |     b'    self.assertThat(observed, matcher, message)'
  2016-02-11 23:31:38.799 |     b'  File "/home/jenkins/workspace/gate-nova-python34/.tox/py34/lib/python3.4/site-packages/testtools/testcase.py", line 447, in assertThat'
  2016-02-11 23:31:38.799 |     b'    raise mismatch_error'
  2016-02-11 23:31:38.799 |     b'testtools.matchers._impl.MismatchError: !=:'
  2016-02-11 23:31:38.799 |     b"reference = {'nova_object.changes': ['memory', 'cpuset', 'id'],"
  2016-02-11 23:31:38.799 |     b" 'nova_object.data': {'cpu_pinning_raw': None,"
  2016-02-11 23:31:38.799 |     b"                      'cpu_policy': None,"
  2016-02-11 23:31:38.800 |     b"                      'cpu_thread_policy': None,"
  2016-02-11 23:31:38.800 |     b"                      'cpu_topology': None,"
  2016-02-11 23:31:38.800 |     b"                      'cpuset': (1, 2),"
  2016-02-11 23:31:38.800 |     b"                      'id': 0,"
  2016-02-11 23:31:38.800 |     b"                      'memory': 512,"
  2016-02-11 23:31:38.800 |     b"                      'pagesize': None},"
  2016-02-11 23:31:38.800 |     b" 'nova_object.name': 'InstanceNUMACell',"
  2016-02-11 23:31:38.800 |     b" 'nova_object.namespace': 'nova',"
  2016-02-11 23:31:38.800 |     b" 'nova_object.version': '1.3'}"
  2016-02-11 23:31:38.801 |     b"actual    = {'nova_object.changes': ['id', 'memory', 'cpuset'],"
  2016-02-11 23:31:38.801 |     b" 'nova_object.data': {'cpu_pinning_raw': None,"
  2016-02-11 23:31:38.801 |     b"                      'cpu_policy': None,"
  2016-02-11 23:31:38.801 |     b"                      'cpu_thread_policy': None,"
  2016-02-11 23:31:38.801 |     b"                      'cpu_topology': None,"
  2016-02-11 23:31:38.801 |     b"                      'cpuset': (1, 2),"
  2016-02-11 23:31:38.801 |     b"                      'id': 0,"
  2016-02-11 23:31:38.801 |     b"                      'memory': 512,"
  2016-02-11 23:31:38.802 |     b"                      'pagesize': None},"
  2016-02-11 23:31:38.802 |     b" 'nova_object.name': 'InstanceNUMACell',"
  2016-02-11 23:31:38.802 |     b" 'nova_object.namespace': 'nova',"
  2016-02-11 23:31:38.802 |     b" 'nova_object.version': '1.3'}"
  2016-02-11 23:31:38.802 |     b''
  2016-02-11 23:31:38.802 |     b''

  The nova_object.changes are a set which aren't sorted so we get
  intermittent results on the py34 job.

  Dan Smith has a patch for this here:
  https://review.openstack.org/#/c/279242/

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


References