Give more time for LVM deactivation

Current code retries three times for deactivation to complete,
waiting one second between retries. On some heavily loaded
systems, and apparently the gate, this is not enough time for
the operation to complete.

This attempts to work around those slower systems by increasing
our retries to 5 and adding a backoff of 2 seconds to give it
more time.

Change-Id: I4f40a1984fe828c8ff965033f7e25b1d7516ab1e
Closes-bug: #1687044
(cherry picked from commit 5744301777)
This commit is contained in:
Sean McGinnis 2017-04-28 14:14:16 -05:00 committed by Ihar Hrachyshka
parent 02fc914ba7
commit 68e0fb82f3
1 changed files with 2 additions and 2 deletions

View File

@ -618,8 +618,8 @@ class LVM(executor.Executor):
# order to prevent a race condition.
self._wait_for_volume_deactivation(name)
@utils.retry(exceptions=exception.VolumeNotDeactivated, retries=3,
backoff_rate=1)
@utils.retry(exceptions=exception.VolumeNotDeactivated, retries=5,
backoff_rate=2)
def _wait_for_volume_deactivation(self, name):
LOG.debug("Checking to see if volume %s has been deactivated.",
name)