Include the amazonvpc logs in toolbox dump

This commit is contained in:
John Gardiner Myers 2021-11-04 20:57:02 -07:00
parent 31737c6027
commit 77fe133869
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)
}
}