Merge "Wait for the stack lock to be released"
This commit is contained in:
commit
e294154f17
@ -328,15 +328,32 @@ class HeatIntegrationTest(testscenarios.WithScenarios,
|
|||||||
env_files = files or {}
|
env_files = files or {}
|
||||||
parameters = parameters or {}
|
parameters = parameters or {}
|
||||||
stack_name = stack_identifier.split('/')[0]
|
stack_name = stack_identifier.split('/')[0]
|
||||||
self.client.stacks.update(
|
|
||||||
stack_id=stack_identifier,
|
build_timeout = self.conf.build_timeout
|
||||||
stack_name=stack_name,
|
build_interval = self.conf.build_interval
|
||||||
template=template,
|
start = timeutils.utcnow()
|
||||||
files=env_files,
|
while timeutils.delta_seconds(start,
|
||||||
disable_rollback=disable_rollback,
|
timeutils.utcnow()) < build_timeout:
|
||||||
parameters=parameters,
|
try:
|
||||||
environment=env
|
self.client.stacks.update(
|
||||||
)
|
stack_id=stack_identifier,
|
||||||
|
stack_name=stack_name,
|
||||||
|
template=template,
|
||||||
|
files=env_files,
|
||||||
|
disable_rollback=disable_rollback,
|
||||||
|
parameters=parameters,
|
||||||
|
environment=env
|
||||||
|
)
|
||||||
|
except heat_exceptions.HTTPConflict as ex:
|
||||||
|
# FIXME(sirushtim): Wait a little for the stack lock to be
|
||||||
|
# released and hopefully, the stack should be updatable again.
|
||||||
|
if ex.error['error']['type'] != 'ActionInProgress':
|
||||||
|
raise ex
|
||||||
|
|
||||||
|
time.sleep(build_interval)
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
kwargs = {'stack_identifier': stack_identifier,
|
kwargs = {'stack_identifier': stack_identifier,
|
||||||
'status': expected_status}
|
'status': expected_status}
|
||||||
if expected_status in ['ROLLBACK_COMPLETE']:
|
if expected_status in ['ROLLBACK_COMPLETE']:
|
||||||
|
Loading…
Reference in New Issue
Block a user