mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
util: Fix tracevol to use --config for oc only
tracevol.py uses --config instead of --kubeconfig when invoked with -c kubectl and -k <some_path> at the same time. Signed-off-by: Santiago Sanchez Paz <sanchezpaz@gmail.com>
This commit is contained in:
parent
8c2bdbc001
commit
6ece9bed92
@ -502,9 +502,10 @@ def get_pv_data(arg, pvname):
|
||||
pvdata = {}
|
||||
cmd = [arg.command]
|
||||
if arg.kubeconfig != "":
|
||||
cmd += ["--config", arg.kubeconfig]
|
||||
else:
|
||||
cmd += ["--kubeconfig", arg.kubeconfig]
|
||||
if arg.command == "oc":
|
||||
cmd += ["--config", arg.kubeconfig]
|
||||
else:
|
||||
cmd += ["--kubeconfig", arg.kubeconfig]
|
||||
|
||||
cmd += ['get', 'pv', pvname, '-o', 'json']
|
||||
out = subprocess.Popen(cmd, stdout=subprocess.PIPE,
|
||||
|
Loading…
Reference in New Issue
Block a user