Merge pull request #12690 from johngmyers/awsvpc-logs

Include the amazonvpc logs in toolbox dump
This commit is contained in:
Kubernetes Prow Robot 2021-11-08 15:12:50 -08:00 committed by GitHub
commit 35c40445d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -81,6 +81,8 @@ func NewLogDumper(sshConfig *ssh.ClientConfig, artifactsDir string) *logDumper {
"startupscript",
"kern",
"docker",
"aws-routed-eni/ipamd",
"aws-routed-eni/plugin",
}
d.podSelectors = []string{
"k8s-app=external-dns",
@ -271,7 +273,7 @@ func (n *logDumperNode) dump(ctx context.Context) []error {
if !strings.HasPrefix(f, prefix) {
continue
}
if err := n.shellToFile(ctx, "sudo cat '"+strings.ReplaceAll(f, "'", "'\\''")+"'", filepath.Join(n.dir, filepath.Base(f))); err != nil {
if err := n.shellToFile(ctx, "sudo cat '"+strings.ReplaceAll(f, "'", "'\\''")+"'", filepath.Join(n.dir, strings.ReplaceAll(strings.TrimPrefix(f, "/var/log/"), "/", "_"))); err != nil {
errors = append(errors, err)
}
}