mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +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 = {}
|
pvdata = {}
|
||||||
cmd = [arg.command]
|
cmd = [arg.command]
|
||||||
if arg.kubeconfig != "":
|
if arg.kubeconfig != "":
|
||||||
cmd += ["--config", arg.kubeconfig]
|
if arg.command == "oc":
|
||||||
else:
|
cmd += ["--config", arg.kubeconfig]
|
||||||
cmd += ["--kubeconfig", arg.kubeconfig]
|
else:
|
||||||
|
cmd += ["--kubeconfig", arg.kubeconfig]
|
||||||
|
|
||||||
cmd += ['get', 'pv', pvname, '-o', 'json']
|
cmd += ['get', 'pv', pvname, '-o', 'json']
|
||||||
out = subprocess.Popen(cmd, stdout=subprocess.PIPE,
|
out = subprocess.Popen(cmd, stdout=subprocess.PIPE,
|
||||||
|
Loading…
Reference in New Issue
Block a user