]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Adds the random option to cinder retry function
authorAdriano Rosso <adriano.rosso@fit-tecnologia.org.br>
Mon, 10 Aug 2015 19:19:31 +0000 (16:19 -0300)
committerAdriano Rosso <adriano.rosso@fit-tecnologia.org.br>
Wed, 19 Aug 2015 13:42:34 +0000 (10:42 -0300)
commitaf03fdd41608c13afe314e4626c74ce1c7304b5f
treed16c44a5720ccc631c68a6ba5c992b58837cbae6
parentc688a0af521e8679ac8f68d3dd035fe998e736d3
Adds the random option to cinder retry function

The current retry functionality in Cinder, always uses fixed
numbers to define the time to wait before performing the next
attempts. This behaviour can make the retries of multiple
requisitions to collide in each attempt as they will wait the
same amount of time and try to use the same resource together
again.

This patch changes the behaviour of cinder.utils.retry() to
receive a parameter that allows the function to implement
randomly generated wait intervals.

Change-Id: If746434e4a19895d649529e9e9f267410a1a1c48
Closes-bug: 1486142
cinder/tests/unit/test_utils.py
cinder/utils.py
cinder/volume/drivers/hitachi/hnas_backend.py