Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "Check for stack failure earlier in undercloud deploy"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Aug 17, 2017
2 parents b1df493 + f468bf7 commit 65d2d6d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tripleoclient/v1/undercloud_deploy.py
Expand Up @@ -38,6 +38,7 @@
from urllib.request import urlopen

from cliff import command
from heatclient.common import event_utils
from heatclient.common import template_utils
from openstackclient.i18n import _

Expand Down Expand Up @@ -199,6 +200,12 @@ def _heat_deploy(self, stack_name, template_path, parameters,
time.sleep(1)
server_stack_id = self._lookup_tripleo_server_stackid(
orchestration_client, stack_id)
status = orchestration_client.stacks.get(stack_id).status
if status == 'FAILED':
event_utils.poll_for_events(orchestration_client, stack_name)
msg = ('Stack failed before deployed-server resource '
'created.')
raise Exception(msg)
if server_stack_id:
break
if not server_stack_id:
Expand Down

0 comments on commit 65d2d6d

Please sign in to comment.