Cinder objects tests fail with PYTHONHASHSEED != 0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Medium
|
Thang Pham |
Bug Description
There are a number of failures in Cinder when we let Python randomize hash seeds, but I wanted to call this one out in particular since it's new code and could indicate a meaningful/tricky bug in objects. (I don't really know.)
See bug 1348818 for the general effort of allowing a random PYTHONHASHSEED.
To reproduce, set PYTHONHASHSEED=33 in tox.ini and run
$ tox -e py27 cinder.
cinder.
-------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "cinder/
File "/home/
File "/home/
raise mismatch_error
testtools.
reference = {'cinder_
'cinder_
'cinder_
'cinder_
'cinder_
actual = {'cinder_
'cinder_
'cinder_
'cinder_
'cinder_
Changed in cinder: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in cinder: | |
assignee: | nobody → Thang Pham (thang-pham) |
Changed in cinder: | |
milestone: | none → kilo-rc1 |
Changed in cinder: | |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | kilo-rc1 → 2015.1.0 |
I am not sure this is really a bug, but the source of it is https:/ /github. com/openstack/ cinder/ blob/master/ cinder/ objects/ base.py# L485
'cinder_ object. changes' are unsorted list. If we sort it during obj_to_primitive(), then this should fix the problem. Once we move to oslo_versionedo bjects, this test case and a large portion of the objects base code will be removed.