From 067590b9f0323758d1867cacff17c83b1bf0d65c Mon Sep 17 00:00:00 2001 From: James Slagle Date: Fri, 17 Feb 2017 10:31:03 -0500 Subject: [PATCH] Show stack failures on error On stack create or update error, go ahead and run "openstack stack failures list overcloud". It's the best way to show the immediate error from a stack failure and it's more user friendly to go ahead and show the error. Note that this module is not currently tested with any unit tests, but if there is general agreement on this patch, I'll work on adding some in a followup. Change-Id: Ibe9a97f3a3088954b1e88fa7c741845f70bd6edf --- tripleoclient/workflows/deployment.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tripleoclient/workflows/deployment.py b/tripleoclient/workflows/deployment.py index 67053252b..e821ed84c 100644 --- a/tripleoclient/workflows/deployment.py +++ b/tripleoclient/workflows/deployment.py @@ -16,6 +16,7 @@ import time import uuid from heatclient.common import event_utils +from openstackclient import shell from tripleoclient import exceptions from tripleoclient import utils @@ -80,6 +81,7 @@ def deploy_and_wait(log, clients, stack, plan_name, verbose_level, create_result = utils.wait_for_stack_ready( orchestration_client, plan_name, marker, action, verbose_events) if not create_result: + shell.OpenStackShell().run(["stack", "failures", "list", plan_name]) if stack is None: raise exceptions.DeploymentError("Heat Stack create failed.") else: