Skip to content

Add collected runtime logs to support bundle archives #1028

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

Open
Tracked by #923
banjoh opened this issue Feb 21, 2023 · 1 comment
Open
Tracked by #923

Add collected runtime logs to support bundle archives #1028

banjoh opened this issue Feb 21, 2023 · 1 comment

Comments

@banjoh
Copy link
Member

banjoh commented Feb 21, 2023

Describe the rationale for the suggested feature.

Whenever we run the support-bundle CLI commands to collect support bundles, we might at times have errors that occur in the various heterogenous k8s environments. Troubleshoot project itself can also have a bug. Logs instrumented in the code capture what happens when executing troubleshoot commands and we would like to copy these logs in support bundle archives for better troubleshooting.

Describe the feature

Pipe all logs streamed to stderr and stdout by the logging library used. Store the logs to file and add them to the support bundle archive.

We rely on k8s client-go library which uses klog. For us to access these logs to write to a file, we would need to use the same logger and pass in a logr.Logger implementation that intercepts all logs. Logs written to the log file are afterwards packaged in the support bundle for archive. NOTE: Passing in log-file or log-dir options is not what this bullet is about.

Additional context

This was split from #1008 PR which was been blocked by kubernetes/klog#363 klog PR.

@banjoh
Copy link
Member Author

banjoh commented Feb 21, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant