Don't poll heat if no stack exists
Cluster objects are created asynchronously from their underlying heat stacks, meaning that the periodic update can sometimes end up trying to poll a cluster's heat stack before the stack has been created. This change checks whether the stack_id is None and skips polling heat if so. This has the side effect of resolving bug 1682058, since we don't try to use a trust and trustee that do not exist. Change-Id: I73f039659250f1d5b69b23141835c4602c8e019a Closes-Bug: #1682058
This commit is contained in:
parent
769f0eea41
commit
88a6e3bab5
|
@ -72,6 +72,11 @@ class HeatDriver(driver.Driver):
|
|||
raise NotImplementedError("Must implement 'get_template_definition'")
|
||||
|
||||
def update_cluster_status(self, context, cluster):
|
||||
if cluster.stack_id is None:
|
||||
# NOTE(mgoddard): During cluster creation it is possible to poll
|
||||
# the cluster before its heat stack has been created. See bug
|
||||
# 1682058.
|
||||
return
|
||||
stack_ctx = mag_ctx.make_cluster_context(cluster)
|
||||
poller = HeatPoller(clients.OpenStackClients(stack_ctx), context,
|
||||
cluster, self)
|
||||
|
|
Loading…
Reference in New Issue