summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrabi <ramishra@redhat.com>2022-02-11 18:13:37 +0530
committerrabi <ramishra@redhat.com>2022-02-11 18:13:37 +0530
commitb1fe9752b0e03a6036e7fde8312a8e0e80e297f9 (patch)
tree58f85abdad23cd134fc256877bc1804f1e64468e
parent0fa19e7a93aba6750d5ee14d0e2fb9803bdcd61a (diff)
downloadheat-b1fe9752b0e03a6036e7fde8312a8e0e80e297f9.tar.gz
Fix for tenacity 8.0.1
Use retry_state parameter that contains all information about current retry invocation in the prepare_attempt callback. Change-Id: Ib47b6335b591850965132448befb7b3dbe31984a Task: 44471
-rw-r--r--heat/engine/resource.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/heat/engine/resource.py b/heat/engine/resource.py
index b43b5a6a9..f6f059318 100644
--- a/heat/engine/resource.py
+++ b/heat/engine/resource.py
@@ -407,8 +407,8 @@ class Resource(status.ResourceStatus):
# Retry in case a signal has updated the atomic_key
attempts = max(cfg.CONF.client_retry_limit, 0) + 1
- def prepare_attempt(fn, attempt):
- if attempt > 1:
+ def prepare_attempt(retry_state):
+ if retry_state.attempt_number > 1:
res_obj = resource_objects.Resource.get_obj(
self.context, self.id)
if (res_obj.engine_id is not None or