From 42ede9ea34503e5c452c15d36382af20920480c0 Mon Sep 17 00:00:00 2001 From: Obliviour Date: Fri, 8 Dec 2023 01:53:50 +0000 Subject: [PATCH] Fix incorrect node count when tpu is in the cluster name --- xpk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xpk.py b/xpk.py index dcece7b8..d584f1b1 100644 --- a/xpk.py +++ b/xpk.py @@ -1591,7 +1591,7 @@ def cluster_describe(args) -> int: xpk_exit(return_code) return_code_node_output, node_output = run_command_for_value( - r"kubectl get node --no-headers=true | grep '\-tpu\-' | wc -l", + r"kubectl get node --no-headers=true --selector='cloud.google.com/gke-tpu-accelerator' | wc -l", 'Count TPU Nodes', args, )