diff --git a/releasenotes/notes/predeployment-validations-1e8eacd36571d5c9.yaml b/releasenotes/notes/predeployment-validations-1e8eacd36571d5c9.yaml new file mode 100644 index 000000000..c0cf3be97 --- /dev/null +++ b/releasenotes/notes/predeployment-validations-1e8eacd36571d5c9.yaml @@ -0,0 +1,4 @@ +--- +features: + - Add a workflow to run all predeployment validations + and report back all errors and warnings. diff --git a/workbooks/validations.yaml b/workbooks/validations.yaml index d4e88ed70..d4b90a776 100644 --- a/workbooks/validations.yaml +++ b/workbooks/validations.yaml @@ -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" %>