summaryrefslogtreecommitdiffstats
path: root/openshift-storage-libs/openshiftstoragelibs/podcmd.py
diff options
context:
space:
mode:
authorvamahaja <vamahaja@redhat.com>2019-07-16 12:04:19 +0530
committervamahaja <vamahaja@redhat.com>2019-08-07 12:34:13 +0530
commitaed2e7e9543969c604a61af020c8a5fbaf38cd04 (patch)
tree0c4de45068e49869b5d0c0cc56ac804dd35bcdc5 /openshift-storage-libs/openshiftstoragelibs/podcmd.py
parent9443109a6fd20e8124b37099e620e6551b25dc8a (diff)
Workaround BZ-1727360 in the "get_gluster_pod_names_by_pvc_name" func
"get_gluster_pod_names_by_pvc_name" function depends on the ocp3.11 specific shell command, which fails on old OCP versions. So, fix it by getting info in compatible way. Also, update usages of this function with new return data structure. Change-Id: Ibb8559590a1288c032630b3292f631d28bc87263 Signed-off-by: vamahaja <vamahaja@redhat.com>
Diffstat (limited to 'openshift-storage-libs/openshiftstoragelibs/podcmd.py')
-rw-r--r--openshift-storage-libs/openshiftstoragelibs/podcmd.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/openshift-storage-libs/openshiftstoragelibs/podcmd.py b/openshift-storage-libs/openshiftstoragelibs/podcmd.py
index 83f49ca..62fff01 100644
--- a/openshift-storage-libs/openshiftstoragelibs/podcmd.py
+++ b/openshift-storage-libs/openshiftstoragelibs/podcmd.py
@@ -87,9 +87,10 @@ def run(target, command, user=None, log_level=None, orig_run=g.run):
if target == 'auto_get_gluster_endpoint':
ocp_client_node = list(g.config['ocp_servers']['client'].keys())[0]
- gluster_pods = openshift_ops.get_ocp_gluster_pod_names(ocp_client_node)
+ gluster_pods = openshift_ops.get_ocp_gluster_pod_details(
+ ocp_client_node)
if gluster_pods:
- target = Pod(ocp_client_node, gluster_pods[0])
+ target = Pod(ocp_client_node, gluster_pods[0]["pod_name"])
else:
target = list(g.config.get("gluster_servers", {}).keys())[0]