Include active nodes when matching nodes by profile
When matching nodes by profile, consider nodes in either the 'active' or 'available' provisioning states. Unless nodes in the 'active' state are included, the derived parameters workflow fails on stack updates. Co-Authored-By: Alan Bishop <abishop@redhat.com> Change-Id: I575d0c358b9efccdefddb26258839def43ebeafd Closes-Bug: #1752893 (cherry picked from commit4820e11d1e
) (cherry picked from commit8f93bfdf1f
)
This commit is contained in:
parent
d21030d7a4
commit
8d38280ea2
@ -915,19 +915,30 @@ workflows:
|
|||||||
- tripleo-common-managed
|
- tripleo-common-managed
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
get_active_nodes:
|
||||||
|
action: ironic.node_list maintenance=false provision_state='active' detail=true
|
||||||
|
on-success: get_available_nodes
|
||||||
|
on-error: set_status_failed_get_active_nodes
|
||||||
|
|
||||||
get_available_nodes:
|
get_available_nodes:
|
||||||
action: ironic.node_list maintenance=false provision_state='available' detail=true
|
action: ironic.node_list maintenance=false provision_state='available' detail=true
|
||||||
on-success: get_matching_nodes
|
on-success: get_matching_nodes
|
||||||
on-error: set_status_failed_get_available_nodes
|
on-error: set_status_failed_get_available_nodes
|
||||||
|
|
||||||
get_matching_nodes:
|
get_matching_nodes:
|
||||||
with-items: node in <% task(get_available_nodes).result %>
|
with-items: node in <% task(get_available_nodes).result + task(get_active_nodes).result %>
|
||||||
action: tripleo.baremetal.get_profile node=<% $.node %>
|
action: tripleo.baremetal.get_profile node=<% $.node %>
|
||||||
on-success: send_message
|
on-success: send_message
|
||||||
on-error: set_status_failed_get_matching_nodes
|
on-error: set_status_failed_get_matching_nodes
|
||||||
publish:
|
publish:
|
||||||
matching_nodes: <% let(input_profile_name => $.profile) -> task(get_matching_nodes).result.where($.profile = $input_profile_name).uuid %>
|
matching_nodes: <% let(input_profile_name => $.profile) -> task(get_matching_nodes).result.where($.profile = $input_profile_name).uuid %>
|
||||||
|
|
||||||
|
set_status_failed_get_active_nodes:
|
||||||
|
on-success: send_message
|
||||||
|
publish:
|
||||||
|
status: FAILED
|
||||||
|
message: <% task(get_active_nodes).result %>
|
||||||
|
|
||||||
set_status_failed_get_available_nodes:
|
set_status_failed_get_available_nodes:
|
||||||
on-success: send_message
|
on-success: send_message
|
||||||
publish:
|
publish:
|
||||||
|
Loading…
Reference in New Issue
Block a user