Resolve stack outputs only on COMPLETE
While the stack is not COMPLETE, we do not need
to resolve the outputs of the stack. Resolving the
outputs is expensive for large stacks.
story: 2002959
task: 22961
Change-Id: I26861214bba8cc92f4e7f9ecba5ba51df99346cb
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
(cherry picked from commit 797f0157d6
)
This commit is contained in:
parent
b33bb3ce6f
commit
c05248d579
|
@ -192,8 +192,10 @@ class HeatPoller(object):
|
|||
# TODO(yuanying): temporary implementation to update api_address,
|
||||
# node_addresses and cluster status
|
||||
try:
|
||||
# Do not resolve outputs by default. Resolving all
|
||||
# node IPs is expensive on heat.
|
||||
stack = self.openstack_client.heat().stacks.get(
|
||||
self.cluster.stack_id)
|
||||
self.cluster.stack_id, resolve_outputs=False)
|
||||
except heatexc.NotFound:
|
||||
self._sync_missing_heat_stack()
|
||||
return
|
||||
|
@ -205,6 +207,10 @@ class HeatPoller(object):
|
|||
|
||||
if stack.stack_status in (fields.ClusterStatus.CREATE_COMPLETE,
|
||||
fields.ClusterStatus.UPDATE_COMPLETE):
|
||||
# Resolve all outputs if the stack is COMPLETE
|
||||
stack = self.openstack_client.heat().stacks.get(
|
||||
self.cluster.stack_id, resolve_outputs=True)
|
||||
|
||||
self._sync_cluster_and_template_status(stack)
|
||||
elif stack.stack_status != self.cluster.status:
|
||||
self._sync_cluster_status(stack)
|
||||
|
|
Loading…
Reference in New Issue