Don't stop create immediately on error for stack resources

Don't stop create immediately on error for stack resources,
such as autoscalingGroup.

Kicked from Gate, heat can't pass pep8.

Change-Id: I0a41954f89e2000785c2105b8366e9e49858b65f
Closes-bug: #1383645
This commit is contained in:
huangtianhua 2014-10-22 15:48:26 +08:00 committed by Sean Dague
parent 68a3cf78c4
commit b025e2d224
1 changed files with 6 additions and 1 deletions

View File

@ -25,6 +25,8 @@ from heat.engine import stack as parser
from heat.engine import template
from heat.openstack.common import log as logging
cfg.CONF.import_opt('error_wait_time', 'heat.common.config')
LOG = logging.getLogger(__name__)
@ -183,11 +185,14 @@ class StackResource(resource.Resource):
self.resource_id_set(nested_id)
action = self._nested.CREATE
error_wait_time = cfg.CONF.error_wait_time
if adopt_data:
action = self._nested.ADOPT
error_wait_time = None
stack_creator = scheduler.TaskRunner(self._nested.stack_task,
action=action)
action=action,
error_wait_time=error_wait_time)
stack_creator.start(timeout=self._nested.timeout_secs())
return stack_creator