From 3585b21e805748434a77cb6732ce9594d8a457ab Mon Sep 17 00:00:00 2001 From: Mudit Agarwal Date: Tue, 28 Jul 2020 20:05:19 +0530 Subject: [PATCH] util: fix tracevol.py to take config map namespace as an option Added a new option so that user can specify the namespace for config map. Signed-off-by: Mudit Agarwal --- troubleshooting/tools/tracevol.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/troubleshooting/tools/tracevol.py b/troubleshooting/tools/tracevol.py index ab94073ae..3ff8e1dff 100755 --- a/troubleshooting/tools/tracevol.py +++ b/troubleshooting/tools/tracevol.py @@ -63,6 +63,8 @@ PARSER.add_argument("-key", "--userkey", default="", help="user password to connect to ceph cluster") PARSER.add_argument("-cm", "--configmap", default="ceph-csi-config", help="configmap name which holds the cephcsi configuration") +PARSER.add_argument("-cmn", "--configmapnamespace", default="default", + help="namespace where configmap exists") def list_pvc_vol_name_mapping(arg): @@ -450,6 +452,7 @@ def get_subvol_group(arg): else: cmd += ["--kubeconfig", arg.kubeconfig] cmd += ['get', 'cm', arg.configmap, '-o', 'json'] + cmd += ['--namespace', arg.configmapnamespace] out = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout, stderr = out.communicate()