From 79bb147bb9e3fcdea6ebc68a8838ab8a2de6e2ae Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 19 Aug 2020 16:40:18 -0400 Subject: [PATCH] (UX) Improve logging if the ephemeral heat stack wasn't created If the ephemeral heat stack wasn't created, raise a proper error message explaining what happens and how to proceed instead of a python stack trace. Change-Id: I4c2e19e290751ea56f1b45aaebc56ea9a5d2c6d1 Closes-Bug: #1892248 (cherry picked from commit 686ac839b4d43c202de7342531a20162a6c1b20c) --- tripleoclient/v1/tripleo_deploy.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tripleoclient/v1/tripleo_deploy.py b/tripleoclient/v1/tripleo_deploy.py index 0b61191a5..8936a8cac 100644 --- a/tripleoclient/v1/tripleo_deploy.py +++ b/tripleoclient/v1/tripleo_deploy.py @@ -825,8 +825,13 @@ class Deploy(command.Command): self.log.warning(_("** Performing Heat stack create.. **")) stack = orchestration_client.stacks.create(**stack_args) - stack_id = stack['stack']['id'] + if not stack: + msg = _('The ephemeral Heat stack could not be created, please ' + 'check logs in /var/log/heat-launcher and/or any ' + 'possible misconfiguration.') + raise exceptions.DeploymentError(msg) + stack_id = stack['stack']['id'] return "%s/%s" % (stack_name, stack_id) def _download_ansible_playbooks(self, client, stack_name,