From c8e0b809205c4c2bbc78b7f1e4935239cf61a8d9 Mon Sep 17 00:00:00 2001 From: Rabi Mishra Date: Thu, 7 May 2020 13:52:00 +0530 Subject: [PATCH] [stable-only] check for stack status IN_PROGRESS to retry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Looks like we're retrying listing of stacks when the stack_status is DELETE_FAILED. As we're not retrying stack deletion again listing the stack again would not change the stack_status automagically, after it's marked DELETE_FAILED. stack delete call won't return before it's marked DELETE_IN_PROGRESS. We can check for stack exists and stack_status DELETE_IN_PROGRESS to retry. Mistral 'continue-on': Defines an expression that will continue iteration loop if it evaluates to ‘true’. Closes-Bug: #1877258 Change-Id: I4885e820868f746e793dacc7eb0c2155f3836d5c (cherry picked from commit 183c206df432cda24160acbd9a4a4a70602ff1b8) --- workbooks/stack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workbooks/stack.yaml b/workbooks/stack.yaml index 994d81f51..8a845e54f 100644 --- a/workbooks/stack.yaml +++ b/workbooks/stack.yaml @@ -96,7 +96,7 @@ workflows: retry: delay: 15 count: <% $.timeout / 15 %> - continue-on: <% $.stack_status = 'DELETE_FAILED' or $.stack in task().result.stacks.select([$.stack_name, $.id]).flatten() %> + continue-on: <% $.stack in task().result.stacks.select([$.stack_name, $.id]).flatten() and $.stack_status = 'DELETE_IN_PROGRESS' %> on-complete: fail: <% $.stack_status = 'DELETE_FAILED' %>