Add workflow wrapping all predeployment checks
This workflow wraps all of the predeployment checks so they can be called at once. It will report back the errors and warnings collected from all the checks. Change-Id: Ic28b91e408b957c850f631759bd4c1b4df86dba3 Partial-Bug: #1638697
This commit is contained in:
parent
d4517cd9cd
commit
9ae174bbaa
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- Add a workflow to run all predeployment validations
|
||||
and report back all errors and warnings.
|
@ -638,3 +638,136 @@ workflows:
|
||||
warnings: <% $.warnings %>
|
||||
on-success:
|
||||
- fail: <% $.get('status') = "FAILED" %>
|
||||
|
||||
check_pre_deployment_validations:
|
||||
input:
|
||||
- deploy_kernel_name: 'bm-deploy-kernel'
|
||||
- deploy_ramdisk_name: 'bm-deploy-ramdisk'
|
||||
- roles_info: {}
|
||||
- stack_id: overcloud
|
||||
- parameters: {}
|
||||
- default_role_counts: {}
|
||||
- run_validations: true
|
||||
- queue_name: tripleo
|
||||
|
||||
output:
|
||||
errors: <% $.errors %>
|
||||
warnings: <% $.warnings %>
|
||||
kernel_id: <% $.kernel_id %>
|
||||
ramdisk_id: <% $.ramdisk_id %>
|
||||
flavors: <% $.flavors %>
|
||||
statistics: <% $.statistics %>
|
||||
tasks:
|
||||
init_messages:
|
||||
on-success: check_boot_images
|
||||
publish:
|
||||
errors: []
|
||||
warnings: []
|
||||
|
||||
check_boot_images:
|
||||
workflow: check_boot_images
|
||||
input:
|
||||
deploy_kernel_name: <% $.deploy_kernel_name %>
|
||||
deploy_ramdisk_name: <% $.deploy_ramdisk_name %>
|
||||
run_validations: <% $.run_validations %>
|
||||
queue_name: <% $.queue_name %>
|
||||
publish:
|
||||
errors: <% $.errors + task(check_boot_images).result.errors %>
|
||||
warnings: <% $.warnings + task(check_boot_images).result.warnings %>
|
||||
kernel_id: <% task(check_boot_images).result.kernel_id %>
|
||||
ramdisk_id: <% task(check_boot_images).result.ramdisk_id %>
|
||||
publish-on-error:
|
||||
errors: <% $.errors + task(check_boot_images).result.errors %>
|
||||
warnings: <% $.warnings + task(check_boot_images).result.warnings %>
|
||||
kernel_id: <% task(check_boot_images).result.kernel_id %>
|
||||
ramdisk_id: <% task(check_boot_images).result.ramdisk_id %>
|
||||
status: FAILED
|
||||
on-complete: collect_flavors
|
||||
|
||||
collect_flavors:
|
||||
workflow: collect_flavors
|
||||
input:
|
||||
roles_info: <% $.roles_info %>
|
||||
run_validations: <% $.run_validations %>
|
||||
queue_name: <% $.queue_name %>
|
||||
publish:
|
||||
errors: <% $.errors + task(collect_flavors).result.errors %>
|
||||
warnings: <% $.warnings + task(collect_flavors).result.warnings %>
|
||||
flavors: <% task(collect_flavors).result.flavors %>
|
||||
publish-on-error:
|
||||
errors: <% $.errors + task(collect_flavors).result.errors %>
|
||||
warnings: <% $.warnings + task(collect_flavors).result.warnings %>
|
||||
flavors: <% task(collect_flavors).result.flavors %>
|
||||
status: FAILED
|
||||
on-complete: check_ironic_boot_configuration
|
||||
|
||||
check_ironic_boot_configuration:
|
||||
workflow: check_ironic_boot_configuration
|
||||
input:
|
||||
kernel_id: <% $.kernel_id %>
|
||||
ramdisk_id: <% $.ramdisk_id %>
|
||||
run_validations: <% $.run_validations %>
|
||||
queue_name: <% $.queue_name %>
|
||||
publish:
|
||||
errors: <% $.errors + task(check_ironic_boot_configuration).result.errors %>
|
||||
warnings: <% $.warnings + task(check_ironic_boot_configuration).result.warnings %>
|
||||
publish-on-error:
|
||||
errors: <% $.errors + task(check_ironic_boot_configuration).result.errors %>
|
||||
warnings: <% $.warnings + task(check_ironic_boot_configuration).result.warnings %>
|
||||
status: FAILED
|
||||
on-complete: verify_profiles
|
||||
|
||||
verify_profiles:
|
||||
workflow: verify_profiles
|
||||
input:
|
||||
flavors: <% $.flavors %>
|
||||
run_validations: <% $.run_validations %>
|
||||
queue_name: <% $.queue_name %>
|
||||
publish:
|
||||
errors: <% $.errors + task(verify_profiles).result.errors %>
|
||||
warnings: <% $.warnings + task(verify_profiles).result.warnings %>
|
||||
publish-on-error:
|
||||
errors: <% $.errors + task(verify_profiles).result.errors %>
|
||||
warnings: <% $.warnings + task(verify_profiles).result.warnings %>
|
||||
status: FAILED
|
||||
on-complete: check_default_nodes_count
|
||||
|
||||
check_default_nodes_count:
|
||||
workflow: check_default_nodes_count
|
||||
input:
|
||||
stack_id: <% $.stack_id %>
|
||||
parameters: <% $.parameters %>
|
||||
default_role_counts: <% $.default_role_counts %>
|
||||
run_validations: <% $.run_validations %>
|
||||
queue_name: <% $.queue_name %>
|
||||
publish:
|
||||
errors: <% $.errors + task(check_default_nodes_count).result.errors %>
|
||||
warnings: <% $.warnings + task(check_default_nodes_count).result.warnings %>
|
||||
statistics: <% task(check_default_nodes_count).result.statistics %>
|
||||
publish-on-error:
|
||||
errors: <% $.errors + task(check_default_nodes_count).result.errors %>
|
||||
warnings: <% $.warnings + task(check_default_nodes_count).result.warnings %>
|
||||
statistics: <% task(check_default_nodes_count).result.statistics %>
|
||||
status: FAILED
|
||||
on-complete: send_message
|
||||
|
||||
send_message:
|
||||
action: zaqar.queue_post
|
||||
retry: count=5 delay=1
|
||||
input:
|
||||
queue_name: <% $.queue_name %>
|
||||
messages:
|
||||
body:
|
||||
type: tripleo.validations.v1.check_hypervisor_stats
|
||||
payload:
|
||||
status: <% $.get('status', 'SUCCESS') %>
|
||||
message: <% $.get('message', '') %>
|
||||
execution: <% execution() %>
|
||||
kernel_id: <% $.kernel_id %>
|
||||
ramdisk_id: <% $.ramdisk_id %>
|
||||
flavors: <% $.flavors %>
|
||||
statistics: <% $.statistics %>
|
||||
errors: <% $.errors %>
|
||||
warnings: <% $.warnings %>
|
||||
on-success:
|
||||
- fail: <% $.get('status') = "FAILED" %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user