From be08b504a8cc284c3feeae69a99fc7ec2fdbc3c0 Mon Sep 17 00:00:00 2001 From: Valerii Ponomarov Date: Tue, 12 Mar 2019 16:40:28 +0530 Subject: 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 --- cns-libs/cnslibs/common/openshift_ops.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cns-libs/cnslibs/common/openshift_ops.py') 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() -- cgit