Print status_reason in the log

In case the cluster could be deleted immediately after the creation
failure, there is no chance to see the reason for debugging purpose.

Change-Id: I627f5b8bef3bc8fef694837cd7f037dc01885b53
This commit is contained in:
Lingxian Kong 2019-07-29 11:55:56 +12:00
parent ae37333661
commit 85700fc464
1 changed files with 2 additions and 2 deletions

View File

@ -154,8 +154,8 @@ class ClusterClient(client.MagnumClient):
self.LOG.info('Cluster %s is created.', cluster_id)
return True
elif model.status in ['ERROR', 'CREATE_FAILED']:
self.LOG.error('Cluster %s is in fail state.',
cluster_id)
self.LOG.error('Cluster %s is in failed state, status_reason: '
'%s', cluster_id, model.status_reason)
raise exceptions.ServerFault(
"Got into an error condition: %s for %s" %
(model.status, cluster_id))