]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix volume throttling to Python 3
authorVictor Stinner <vstinner@redhat.com>
Thu, 1 Oct 2015 16:04:30 +0000 (18:04 +0200)
committerVictor Stinner <vstinner@redhat.com>
Fri, 2 Oct 2015 07:01:03 +0000 (07:01 +0000)
commit2e20e70e1430b1f05a98616ba47464829e764390
tree7de5f07b1a1904a90cb6ff72e2f5597ac0831c8a
parent7f498b0d4a07770d4f90fe2d185a8446ee0d5ace
Fix volume throttling to Python 3

BlkioCgroup._set_limits(): sort devices before iterating on them to
have a reliable behaviour.

The devs variable is a dictionary. On Python 3, the hash function is
now randomized, so iterating on a dictionary gives items in a random
order. Use sorted() to iterate on the list of sorted devices instead.

tox.ini: add cinder.tests.unit.test_volume_throttling to Python 3.

Blueprint cinder-python3
Partial-Bug: #1348818
Change-Id: Icf7141f772397c7ac08f0f1e21ad74cb86a06351
cinder/volume/throttling.py
tox.ini