Block the scale down workflow until the stack is COMPLETE or FAILED

Use the new workflow that loops until stack goes to IN_PROGRESS, then
loop until stack is COMPLETE or FAILED so a client doesn't need to
continually check.

Change-Id: I0a507bc2f20faf1ba1d76bc5f694548db3449b75
Closes-Bug: #1640770
This commit is contained in:
Brad P. Crochet 2016-12-06 13:48:31 -05:00
parent 332780222e
commit 1c7a60f5a8
1 changed files with 14 additions and 2 deletions

View File

@ -18,14 +18,26 @@ workflows:
delete_node:
action: tripleo.scale.delete_node nodes=<% $.nodes %> timeout=<% $.timeout %> container=<% $.container %>
on-success: wait_for_stack_in_progress
on-error: set_delete_node_failed last_result=<% task(delete_node).result %>
wait_for_stack_in_progress:
workflow: tripleo.stack.v1.wait_for_stack_in_progress stack=<% $.container %>
on-success: wait_for_stack_complete
on-error: set_delete_node_failed last_result=<% task(wait_for_stack_in_progress).result %>
wait_for_stack_complete:
workflow: tripleo.stack.v1.wait_for_stack_complete_or_failed stack=<% $.container %>
on-success: send_message
on-error: set_delete_node_failed
on-error: set_delete_node_failed last_result=<% task(wait_for_stack_complete).result %>
set_delete_node_failed:
input:
last_result: 'Task failed'
on-success: send_message
publish:
status: FAILED
message: <% task(delete_node).result %>
message: <% last_result %>
send_message:
action: zaqar.queue_post