Status description is set on errors
If cluster comes into Error state, status_description field would contain information about the error, Implements blueprint expose-cluster-errors-details Change-Id: I6ac629db331515ba8f5ef02b39852b6be9f592c9
This commit is contained in:
parent
a862927f2d
commit
c80b956307
@ -73,9 +73,10 @@ def create_cluster(values):
|
||||
try:
|
||||
context.model_update(cluster, status='Validating')
|
||||
plugin.validate(cluster)
|
||||
except Exception:
|
||||
except Exception as ex:
|
||||
with excutils.save_and_reraise_exception():
|
||||
context.model_update(cluster, status='Error')
|
||||
context.model_update(cluster, status='Error',
|
||||
status_description=str(ex))
|
||||
|
||||
context.spawn(_provision_cluster, cluster.id)
|
||||
|
||||
|
@ -44,7 +44,8 @@ def create_cluster(cluster):
|
||||
except Exception as ex:
|
||||
LOG.warn("Can't start cluster '%s' (reason: %s)", cluster.name, ex)
|
||||
with excutils.save_and_reraise_exception():
|
||||
context.model_update(cluster, status='Error')
|
||||
context.model_update(cluster, status='Error',
|
||||
status_description=str(ex))
|
||||
_rollback_cluster_creation(cluster, ex)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user