diff options
author | 2017-07-10 15:34:40 -0600 | |
---|---|---|
committer | 2017-07-10 15:34:40 -0600 | |
commit | 7e241389c1f6f2366f7d8bef29eae938aefa4936 (patch) | |
tree | 15f6873a1c013f35a54337caa655228698beb6a6 | |
parent | 4ad9342789eb54b91147533691e99270ccd9cca1 (diff) |
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 <s.pisarski@cablelabs.com>
-rw-r--r-- | snaps/openstack/create_stack.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |