Merge pull request #22383 from spxtr/core

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot
2016-03-08 06:44:18 -08:00
2 changed files with 12 additions and 156 deletions

View File

@@ -29,6 +29,7 @@ import (
"net/url"
"os"
"os/exec"
"path"
"path/filepath"
"sort"
"strconv"
@@ -3559,3 +3560,14 @@ func CheckConnectivityToHost(f *Framework, nodeName, podName, host string) error
defer podClient.Delete(podName, nil)
return waitForPodSuccessInNamespace(f.Client, podName, contName, f.Namespace.Name)
}
// 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.
func CoreDump(dir string) {
cmd := exec.Command(path.Join(testContext.RepoRoot, "cluster", "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)
}
}