summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang (Gabriel) Yu <Gabriel.yuyang@huawei.com>2019-02-25 14:38:29 +0800
committerYang (Gabriel) Yu <Gabriel.yuyang@huawei.com>2019-02-25 06:46:22 +0000
commitd59b438c2afb33f9c728bc7dbbb41813ff8985c3 (patch)
tree50d70cad200783e3ca0b45577752086e7d723589
parent761fa72d9626b074a05088d8f89065d7d16bffbb (diff)
bugfix: right cols to get available podsstable/gambia
JIRA: BOTTLENECK-251 It seems the displaying of kubectl get pods changes and the number of available pods is at the 4th cols. Change-Id: I4b00bd084133a47907a0c7c9c655852b1ea52324 Signed-off-by: Yang (Gabriel) Yu <Gabriel.yuyang@huawei.com> (cherry picked from commit 16bb5e7d7745aab049d1a6810cef1ee620afa9cc)
-rw-r--r--utils/k8s_setup/k8s_utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/k8s_setup/k8s_utils.py b/utils/k8s_setup/k8s_utils.py
index a89889f3..ad2cc991 100644
--- a/utils/k8s_setup/k8s_utils.py
+++ b/utils/k8s_setup/k8s_utils.py
@@ -67,7 +67,7 @@ def get_deployment_status(name, namespace):
def get_available_pods(name, namespace):
CMD = ("kubectl get deployment --namespace={} | grep {}".format(
- namespace, name) + " | awk '{print $5}'")
+ namespace, name) + " | awk '{print $4}'")
available_pods = commands.getstatusoutput(CMD)
return int(available_pods[1])