gate-nova-python34 some times test failed on test_save_updates_numa_topology

Bug #1473949 reported by Chung Chih, Hung
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Sean Dague

Bug Description

After I commit review, I got gate-nova-python34 FAILURE in following log file
http://logs.openstack.org/19/201019/1/check/gate-nova-python34/1e74b65/console.html

The assert meessages are
AssertionError: Expected call: instance_extra_update_by_uuid(<nova.context.RequestContext object at 0x7fb95f499dd8>, 'fake-uuid', {'numa_topology': '{"nova_object.version": "1.1", "nova_object.name": "InstanceNUMATopology", "nova_object.changes": ["cells", "instance_uuid"], "nova_object.data": {"cells": [{"nova_object.version": "1.2", "nova_object.name": "InstanceNUMACell", "nova_object.changes": ["memory", "id", "cpuset"], "nova_object.data": {"pagesize": null, "cpu_pinning_raw": null, "cpu_topology": null, "id": 0, "cpuset": [0], "memory": 128}, "nova_object.namespace": "nova"}, {"nova_object.version": "1.2", "nova_object.name": "InstanceNUMACell", "nova_object.changes": ["memory", "id", "cpuset"], "nova_object.data": {"pagesize": null, "cpu_pinning_raw": null, "cpu_topology": null, "id": 1, "cpuset": [1], "memory": 128}, "nova_object.namespace": "nova"}], "instance_uuid": "fake-uuid"}, "nova_object.namespace": "nova"}'})
2015-07-13 07:28:22.759 | Actual call: instance_extra_update_by_uuid(<nova.context.RequestContext object at 0x7fb95f499dd8>, 'fake-uuid', {'numa_topology': '{"nova_object.version": "1.1", "nova_object.name": "InstanceNUMATopology", "nova_object.changes": ["cells", "instance_uuid"], "nova_object.data": {"cells": [{"nova_object.version": "1.2", "nova_object.name": "InstanceNUMACell", "nova_object.changes": ["memory", "cpuset", "id"], "nova_object.data": {"pagesize": null, "cpu_pinning_raw": null, "cpu_topology": null, "id": 0, "cpuset": [0], "memory": 128}, "nova_object.namespace": "nova"}, {"nova_object.version": "1.2", "nova_object.name": "InstanceNUMACell", "nova_object.changes": ["memory", "cpuset", "id"], "nova_object.data": {"pagesize": null, "cpu_pinning_raw": null, "cpu_topology": null, "id": 1, "cpuset": [1], "memory": 128}, "nova_object.namespace": "nova"}], "instance_uuid": "fake-uuid"}, "nova_object.namespace": "nova"}'})

You can notice the difference of these two value are "nova_object.changes" in cells object. They have same element with different order.

This is because of the order of _changed_fields was not always same. Therefore the two value's order are different.
But python27 will not had this problem. Because of when we want to get object's change, those changes will been save in set and finally return it.
Python27's set collection will sort content, but python34 wouldn't.

Changed in nova:
assignee: nobody → lyanchih (lyanchih)
Revision history for this message
jichenjc (jichenjc) wrote :
Revision history for this message
Chung Chih, Hung (lyanchih) wrote :

jichenjs,
I also felt strange. Those related area was modified for a long time. I don't find any Influential change recently.
Besides, is the link show all openstack log build by jenkins?

Revision history for this message
jichenjc (jichenjc) wrote :

I guess so though I am not that confident (I got the link from someone else and change the search key word by myself), you might want to ask on IRC if you to confirm

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/201161

Changed in nova:
assignee: lyanchih (lyanchih) → Davanum Srinivas (DIMS) (dims-v)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Davanum Srinivas (dims) (<email address hidden>) on branch: master
Review: https://review.openstack.org/201161

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/201579

Changed in nova:
assignee: Davanum Srinivas (DIMS) (dims-v) → lyanchih (lyanchih)
Changed in nova:
assignee: lyanchih (lyanchih) → Sean Dague (sdague)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 1414f5d9a8d709ff66c8d80cd3dc087d2a717d31
Author: Sean Dague <email address hidden>
Date: Tue Jul 14 14:40:26 2015 -0400

    make test_save_updates_numa_topology stable across python versions

    test_save_updates_numa_topology has a rather complex nova object to
    represent numa. This includes items which are sets, but must be
    converted to lists for json. This is not a stable output operation
    across all space and time. The mock comparator was failing here some
    times because of it.

    Instead, we can manually inspect the parameter in question with our
    json comparator to ensure that it is correct.

    Closes-Bug: #1473949

    Change-Id: Ibfa441356d10417e2b1e092826562ad03d8cfd02

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by lyanchih (<email address hidden>) on branch: master
Review: https://review.openstack.org/201579

Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-2 → 12.0.0
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.