Improve validations output for troubleshooting.
Currently, the tripleo validations are being used to evaluate the status of the environment before/after certain steps (post-deploy, pre-upgrade, post-upgrade) However, when obtaining the workflow execution output, if some of the validations failed there is no information about which one, and the reason behind. This patch allows identifying the validation being run in the run_validation action and publishes the results for the group or list of validations being run in the run_validations and run_validation_group workflows. Change-Id: I81ba3a8c287712e0248476e64da0136fc09e26d5 Story: #2002911
This commit is contained in:
parent
2fac6c89b5
commit
1d17a99925
@ -35,6 +35,7 @@ workflows:
|
||||
action: tripleo.validations.run_validation validation=<% $.validation_name %> plan=<% $.plan %>
|
||||
publish:
|
||||
status: SUCCESS
|
||||
validation: <% $.validation_name %>
|
||||
stdout: <% task().result.stdout %>
|
||||
stderr: <% task().result.stderr %>
|
||||
|
||||
@ -42,6 +43,7 @@ workflows:
|
||||
on-complete: send_message
|
||||
publish:
|
||||
status: FAILED
|
||||
validation: <% $.validation_name %>
|
||||
stdout: <% task(run_validation).result.stdout %>
|
||||
stderr: <% task(run_validation).result.stderr %>
|
||||
|
||||
@ -86,15 +88,21 @@ workflows:
|
||||
run_validations:
|
||||
on-success: send_message
|
||||
on-error: set_status_failed
|
||||
workflow: tripleo.validations.v1.run_validation validation_name=<% $.validation %> plan=<% $.plan %> queue_name=<% $.queue_name %>
|
||||
workflow: tripleo.validations.v1.run_validation
|
||||
input:
|
||||
validation_name: <% $.validation %>
|
||||
plan: <% $.plan %>
|
||||
queue_name: <% $.queue_name %>
|
||||
with-items: validation in <% $.validation_names %>
|
||||
publish:
|
||||
status: SUCCESS
|
||||
message: <% task().result %>
|
||||
|
||||
set_status_failed:
|
||||
on-complete: send_message
|
||||
publish:
|
||||
status: FAILED
|
||||
message: <% task(run_validations).result.where($.status = 'FAILED') %>
|
||||
|
||||
send_message:
|
||||
workflow: tripleo.messaging.v1.send
|
||||
@ -102,6 +110,7 @@ workflows:
|
||||
queue_name: <% $.queue_name %>
|
||||
type: <% execution().name %>
|
||||
status: <% $.get('status', 'SUCCESS') %>
|
||||
message: <% $.get('message', '') %>
|
||||
execution: <% execution() %>
|
||||
plan_name: <% $.plan %>
|
||||
payload:
|
||||
@ -142,15 +151,21 @@ workflows:
|
||||
run_validation_group:
|
||||
on-success: send_message
|
||||
on-error: set_status_failed
|
||||
workflow: tripleo.validations.v1.run_validation validation_name=<% $.validation %> plan=<% $.plan %> queue_name=<% $.queue_name %>
|
||||
workflow: tripleo.validations.v1.run_validation
|
||||
input:
|
||||
validation_name: <% $.validation %>
|
||||
plan: <% $.plan %>
|
||||
queue_name: <% $.queue_name %>
|
||||
with-items: validation in <% $.validations.id %>
|
||||
publish:
|
||||
status: SUCCESS
|
||||
message: <% task().result %>
|
||||
|
||||
set_status_failed:
|
||||
on-complete: send_message
|
||||
publish:
|
||||
status: FAILED
|
||||
message: <% task(run_validation_group).result.where($.status = 'FAILED') %>
|
||||
|
||||
send_message:
|
||||
workflow: tripleo.messaging.v1.send
|
||||
@ -158,6 +173,7 @@ workflows:
|
||||
queue_name: <% $.queue_name %>
|
||||
type: <% execution().name %>
|
||||
status: <% $.get('status', 'SUCCESS') %>
|
||||
message: <% $.get('message', '') %>
|
||||
execution: <% execution() %>
|
||||
plan_name: <% $.plan %>
|
||||
payload:
|
||||
|
Loading…
x
Reference in New Issue
Block a user