-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run cluster-info in a collector pod #2
Conversation
cmd/troubleshoot/cli/receive.go
Outdated
} | ||
} | ||
|
||
if !alreadyReceived { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe?
if alreadyReceived {
continue
}
cmd/troubleshoot/cli/receive.go
Outdated
|
||
decoded, err := base64.StdEncoding.DecodeString(string(body)) | ||
if err != nil { | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about moving on to the next file if this fails
|
||
files := make(map[string][]byte) | ||
if err := json.Unmarshal(decoded, &files); err != nil { | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about moving on to the next file if this fails
|
||
paths := make([]string, 0, 0) | ||
for _, id := range receivedCollectors { | ||
paths = append(paths, filepath.Join(bundlePath, id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if some errors are ignored, this should check if path exists
paths = append(paths, filepath.Join(bundlePath, id)) | ||
} | ||
|
||
if err := tarGz.Archive(paths, "support-bundle.tar.gz"); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this overwrite existing bundle with the same name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it will not . it errors with "support-bundle.tar.gz already exists".
} else { | ||
for _, foundCollectorJob := range collectorJobs.Items { | ||
if foundCollectorJob.Spec.Collector.Name == v.GetString("collectors") { | ||
collectorJob = &foundCollectorJob |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
break
here?
6066771
to
d60de90
Compare
No description provided.