Fail node cleaning on timeout
The Use of a retry with continue-on causes the task wait_for_provision_state to finish in success. We need another task to test the provisioning state and conditionally fail based on that. Closes-Bug: #1796293 Change-Id: I94fe438a05c3d20b927f9fe1bc8cc3ea10d85f1e
This commit is contained in:
parent
3e61f4f08c
commit
70ed637818
@ -130,13 +130,21 @@ workflows:
|
|||||||
message: <% task(set_provision_state).result %>
|
message: <% task(set_provision_state).result %>
|
||||||
|
|
||||||
wait_for_provision_state:
|
wait_for_provision_state:
|
||||||
on-success: send_message
|
|
||||||
action: ironic.node_get node_id=<% $.node_uuid %>
|
action: ironic.node_get node_id=<% $.node_uuid %>
|
||||||
timeout: <% $.timeout %>
|
timeout: <% $.timeout %>
|
||||||
retry:
|
retry:
|
||||||
delay: <% $.retry_delay %>
|
delay: <% $.retry_delay %>
|
||||||
count: <% $.retry_count %>
|
count: <% $.retry_count %>
|
||||||
continue-on: <% task().result.provision_state != 'manageable' %>
|
continue-on: <% task().result.provision_state != 'manageable' %>
|
||||||
|
on-complete:
|
||||||
|
- send_message: <% task().result.provision_state = 'manageable' %>
|
||||||
|
- state_not_reached: <% task().result.provision_state != 'manageable' %>
|
||||||
|
|
||||||
|
state_not_reached:
|
||||||
|
publish:
|
||||||
|
status: FAILED
|
||||||
|
message: Cleaning of node <% $.node_uuid %> timed out.
|
||||||
|
on-complete: send_message
|
||||||
|
|
||||||
send_message:
|
send_message:
|
||||||
workflow: tripleo.messaging.v1.send
|
workflow: tripleo.messaging.v1.send
|
||||||
|
Loading…
Reference in New Issue
Block a user