From 85700fc464f8fad9cb323659278cdee101d8aaed Mon Sep 17 00:00:00 2001 From: Lingxian Kong Date: Mon, 29 Jul 2019 11:55:56 +1200 Subject: [PATCH] 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 --- magnum_tempest_plugin/tests/api/v1/clients/cluster_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magnum_tempest_plugin/tests/api/v1/clients/cluster_client.py b/magnum_tempest_plugin/tests/api/v1/clients/cluster_client.py index 0b01897..77066ea 100755 --- a/magnum_tempest_plugin/tests/api/v1/clients/cluster_client.py +++ b/magnum_tempest_plugin/tests/api/v1/clients/cluster_client.py @@ -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))