mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-19 10:34:01 +00:00
PT-2302 - pt-k8s-debug-collector cannot pass properly to pt-mysql-summary PXC root password with special characters
- Implemented fix in pt-k8s-debug-collector
This commit is contained in:
@@ -421,15 +421,15 @@ func (d *Dumper) getPodSummary(resource, podName, crName string, namespace strin
|
|||||||
}
|
}
|
||||||
ports = port + ":3306"
|
ports = port + ":3306"
|
||||||
summCmdName = "pt-mysql-summary"
|
summCmdName = "pt-mysql-summary"
|
||||||
summCmdArgs = []string{"--host=127.0.0.1", "--port=" + port, "--user=root", "--password='" + string(pass) + "'"}
|
summCmdArgs = []string{"--host=127.0.0.1", "--port=" + port, "--user=root", "--password=" + string(pass)}
|
||||||
case "pg","pgv2":
|
case "pg", "pgv2":
|
||||||
var kubeconfig string=""
|
var kubeconfig string = ""
|
||||||
if d.kubeconfig != "" {
|
if d.kubeconfig != "" {
|
||||||
kubeconfig=" --kubeconfig=" + d.kubeconfig
|
kubeconfig = " --kubeconfig=" + d.kubeconfig
|
||||||
}
|
}
|
||||||
summCmdName = "sh"
|
summCmdName = "sh"
|
||||||
summCmdArgs = []string{"-c", "curl https://raw.githubusercontent.com/percona/support-snippets/master/postgresql/pg_gather/gather.sql 2>/dev/null | " +
|
summCmdArgs = []string{"-c", "curl https://raw.githubusercontent.com/percona/support-snippets/master/postgresql/pg_gather/gather.sql 2>/dev/null | " +
|
||||||
d.cmd + kubeconfig + " -n "+ namespace + " exec -i "+ podName +" -- psql -X -f - "}
|
d.cmd + kubeconfig + " -n " + namespace + " exec -i " + podName + " -- psql -X -f - "}
|
||||||
case "psmdb":
|
case "psmdb":
|
||||||
var port string
|
var port string
|
||||||
if d.forwardport != "" {
|
if d.forwardport != "" {
|
||||||
@@ -451,7 +451,7 @@ func (d *Dumper) getPodSummary(resource, podName, crName string, namespace strin
|
|||||||
}
|
}
|
||||||
ports = port + ":27017"
|
ports = port + ":27017"
|
||||||
summCmdName = "pt-mongodb-summary"
|
summCmdName = "pt-mongodb-summary"
|
||||||
summCmdArgs = []string{"--username='" + user + "'", "--password='" + pass + "'", "--authenticationDatabase=admin", "127.0.0.1:" + port}
|
summCmdArgs = []string{"--username='" + user + "'", "--password=" + pass, "--authenticationDatabase=admin", "127.0.0.1:" + port}
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdPortFwd := exec.Command(d.cmd, "port-forward", "pod/"+podName, ports, "-n", namespace, "--kubeconfig", d.kubeconfig)
|
cmdPortFwd := exec.Command(d.cmd, "port-forward", "pod/"+podName, ports, "-n", namespace, "--kubeconfig", d.kubeconfig)
|
||||||
|
Reference in New Issue
Block a user