summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2016-02-23 13:11:00 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2016-02-23 13:11:00 -0500
commitb2f98aca79a9e50ce745f47e2e038e07496ed280 (patch)
tree59a488058c83c1dd56752704d85e0bdac5bd5780 /playbooks
parent09de9a99702ab3b883ed4ede919194a21aed1db3 (diff)
parent1d832a01362e0cbf97c8f3ff660fa4ef8b3c8426 (diff)
downloadopenshift-b2f98aca79a9e50ce745f47e2e038e07496ed280.tar.gz
openshift-b2f98aca79a9e50ce745f47e2e038e07496ed280.tar.bz2
openshift-b2f98aca79a9e50ce745f47e2e038e07496ed280.tar.xz
openshift-b2f98aca79a9e50ce745f47e2e038e07496ed280.zip
Merge pull request #1481 from lhuard1A/openstack_debug_msg
Better diagnostic messages when an OpenStack heat stack creation fails
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/openstack/openshift-cluster/launch.yml37
1 files changed, 35 insertions, 2 deletions
diff --git a/playbooks/openstack/openshift-cluster/launch.yml b/playbooks/openstack/openshift-cluster/launch.yml
index e9b9cf540..0afcad72e 100644
--- a/playbooks/openstack/openshift-cluster/launch.yml
+++ b/playbooks/openstack/openshift-cluster/launch.yml
@@ -29,7 +29,7 @@
- name: Create or Update OpenStack Stack
command: 'heat {{ heat_stack_action }} -f {{ openstack_infra_heat_stack }}
- --timeout 3 --enable-rollback
+ --timeout 3
-P cluster_env={{ cluster_env }}
-P cluster_id={{ cluster_id }}
-P subnet_24_prefix={{ openstack_subnet_24_prefix }}
@@ -59,7 +59,40 @@
until: stack_show_status_result.stdout not in ['CREATE_IN_PROGRESS', 'UPDATE_IN_PROGRESS']
retries: 30
delay: 5
- failed_when: stack_show_status_result.stdout not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']
+
+ - name: Display the stack resources
+ command: 'heat resource-list openshift-ansible-{{ cluster_id }}-stack'
+ register: stack_resource_list_result
+ when: stack_show_status_result.stdout not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']
+
+ - name: Display the stack status
+ command: 'heat stack-show openshift-ansible-{{ cluster_id }}-stack'
+ register: stack_show_result
+ when: stack_show_status_result.stdout not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']
+
+ - name: Delete the stack
+ command: 'heat stack-delete openshift-ansible-{{ cluster_id }}-stack'
+ when: stack_show_status_result.stdout not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']
+
+ - fail:
+ msg: |
+
+ +--------------------------------------+
+ | ^ |
+ | /!\ Failed to create the heat stack |
+ | /___\ |
+ +--------------------------------------+
+
+ Here is the list of stack resources and their status:
+ {{ stack_resource_list_result.stdout }}
+
+ Here is the status of the stack:
+ {{ stack_show_result.stdout }}
+
+ ^ Failed to create the heat stack
+ /!\
+ /___\ Please check the `stack_status_reason` line in the above array to know why.
+ when: stack_show_status_result.stdout not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']
- name: Read OpenStack Stack outputs
command: 'heat stack-show openshift-ansible-{{ cluster_id }}-stack'