From 7e241389c1f6f2366f7d8bef29eae938aefa4936 Mon Sep 17 00:00:00 2001 From: spisarski Date: Mon, 10 Jul 2017 15:34:40 -0600 Subject: Fixed stack create status check on error. Was checking for the status string of "ERROR" when "CREATE_FAILED" should have been used. This bug caused the heat stack test to hang instead of raising an exception. Change-Id: I91e04d58bed083fd8b93ec908c766c0ddc4828de Signed-off-by: spisarski --- snaps/openstack/create_stack.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snaps/openstack/create_stack.py b/snaps/openstack/create_stack.py index 1492829..cb06e8a 100644 --- a/snaps/openstack/create_stack.py +++ b/snaps/openstack/create_stack.py @@ -25,6 +25,7 @@ logger = logging.getLogger('create_stack') STACK_COMPLETE_TIMEOUT = 1200 POLL_INTERVAL = 3 +STATUS_CREATE_FAILED = 'CREATE_FAILED' STATUS_CREATE_COMPLETE = 'CREATE_COMPLETE' STATUS_DELETE_COMPLETE = 'DELETE_COMPLETE' @@ -180,7 +181,7 @@ class OpenStackHeatStack: 'Cannot stack status for stack with ID - ' + self.__stack.id) return False - if status == 'ERROR': + if status == STATUS_CREATE_FAILED: raise StackCreationError('Stack had an error during deployment') logger.debug('Stack status is - ' + status) return status == expected_status_code -- cgit 1.2.3-korg