mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-01 22:34:14 +00:00
Enable logexporter mechanism to dump logs from k8s nodes to GCS directly
This commit is contained in:
@@ -4287,17 +4287,17 @@ func CheckConnectivityToHost(f *Framework, nodeName, podName, host string, timeo
|
||||
}
|
||||
|
||||
// CoreDump SSHs to the master and all nodes and dumps their logs into dir.
|
||||
// It shells out to cluster/log-dump.sh to accomplish this.
|
||||
// It shells out to cluster/log-dump/log-dump.sh to accomplish this.
|
||||
func CoreDump(dir string) {
|
||||
if TestContext.DisableLogDump {
|
||||
Logf("Skipping dumping logs from cluster")
|
||||
return
|
||||
}
|
||||
cmd := exec.Command(path.Join(TestContext.RepoRoot, "cluster", "log-dump.sh"), dir)
|
||||
cmd := exec.Command(path.Join(TestContext.RepoRoot, "cluster", "log-dump", "log-dump.sh"), dir)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
if err := cmd.Run(); err != nil {
|
||||
Logf("Error running cluster/log-dump.sh: %v", err)
|
||||
Logf("Error running cluster/log-dump/log-dump.sh: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user