summaryrefslogtreecommitdiffstats
path: root/cns-libs/cnslibs/common/openshift_ops.py
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-03-12 16:40:28 +0530
committerValerii Ponomarov <vponomar@redhat.com>2019-03-12 16:42:57 +0530
commitbe08b504a8cc284c3feeae69a99fc7ec2fdbc3c0 (patch)
tree3870e8d41b21ad3e24f3b1835a04d5801c6e4c3f /cns-libs/cnslibs/common/openshift_ops.py
parent9bcec5a15f8c52fb5615e469e31a01fe08523a29 (diff)
Fix error messages in wait_for_pod_be_ready and enable_pvc_resize funcs
"wait_for_pod_be_ready" and "enable_pvc_resize" hide errors details when errors appear. So, fix it by printing full error info. Change-Id: I250ff723c0453fd487f8c1810cdd2c1d7d2ec16f
Diffstat (limited to 'cns-libs/cnslibs/common/openshift_ops.py')
-rw-r--r--cns-libs/cnslibs/common/openshift_ops.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cns-libs/cnslibs/common/openshift_ops.py b/cns-libs/cnslibs/common/openshift_ops.py
index b7390152..0d44df1f 100644
--- a/cns-libs/cnslibs/common/openshift_ops.py
+++ b/cns-libs/cnslibs/common/openshift_ops.py
@@ -930,7 +930,8 @@ def wait_for_pod_be_ready(hostname, pod_name,
":.status.phase") % pod_name
ret, out, err = g.run(hostname, cmd, "root")
if ret != 0:
- msg = ("failed to execute cmd %s" % cmd)
+ msg = "Failed to execute cmd: %s\nout: %s\nerr: %s" % (
+ cmd, out, err)
g.log.error(msg)
raise exceptions.ExecutionError(msg)
output = out.strip().split()