-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
Update to latest klog 0.4.0 #81164
Update to latest klog 0.4.0 #81164
Conversation
47ffc4e Add test case for detecting data race 959d342 Prevent data race in SetOutput* methods 34123a4 Test with golang 1.12.x bf4884f Fix the log duplication issue for --log-file dc5546c Backfill integration tests for selecting log destinations baef93d fix broken links 07b218b Add go modules files b33ae69 Add flag to include file's dir in logs 7c58910 correct documentation a4033db Code Hygene - glog to klog 941d47b Revert "Fix the log duplication issue for --log-file." 314f6c4 Update godoc for the default value of logtostderr 7eb35e2 Fix the log duplication issue for --log-file.
/milestone v1.16 |
/sig release |
@liggitt the first step i was told was to run |
/test pull-kubernetes-e2e-gce-large-performance |
was any functional test added to verify kubernetes/klog@bf4884f fixed the duplication issue? |
@liggitt tested this manually |
|
||
if logging.logFile != "" { | ||
// Since we are using a single log file, all of the items in l.file array | ||
// will point to the same file, so just use one of them to write data. |
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.
Since we are using a single log file, all of the items in l.file array
will point to the same file, so just use one of them to write data.
is that accurate if SetOutputBySeverity
was called?
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.
@liggitt i should probably add godoc comments that when using SetOutput* they should avoid setting any command line params.
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 CLI flags and SetOutputBySeverity are mutually exclusive, and kube doesn't use SetOutputBySeverity, that's probably ok. Definitely needs documenting
a follow-up (in klog) that exercises this in a test would be good. this is fragile enough that I could see it silently regressing |
/lgtm /hold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims, liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@liggitt added kubernetes/klog#85 and kubernetes/klog#84 as follow ups |
/test pull-kubernetes-e2e-gce-large-performance |
In the previous attempt, the klog update itself (without actually switching to --log-file flag) was a root cause of significant performance regression. I think it would be good to test this in 5k environment before submission. |
I wanted to run the previous experiment one more time to ensure it wasn't flake. I didn't yet try only this PR - let me try doing that now. |
@wojtek-t it will give me more information on where the problem could be. "immediately after first log-rotation" seems like a pretty big hint at this point. I just want to confirm that without the distroless just this PR works fine. |
That would seem to indicate the issue is not a performance issue, but an actual bug in the log rotation code (possibly when combined with the distroless environment... unexpectedly readonly filesystems, etc?) |
@liggitt exactly! |
I think that it can still be performance issue, just with distroless we're configuring stuff differently and using a different code-path. That said, I've run scalability tests against just this PR (5k-node cluster) and the results look fine (i.e. they are comparable with head). |
@wojtek-t agree. I'll start looking at the code path for rotation in klog and file follow up PR(s). Can you please point me to logs from the broken run (with distroless) please? /hold cancel |
….4.0 Update to latest klog 0.4.0 Kubernetes-commit: 461b2d8
kubernetes/klog@47ffc4e - Add test case for detecting data race
kubernetes/klog@959d342 - Prevent data race in SetOutput* methods
kubernetes/klog@34123a4 - Test with golang 1.12.x
kubernetes/klog@bf4884f - Fix the log duplication issue for --log-file
kubernetes/klog@dc5546c - Backfill integration tests for selecting log destinations
kubernetes/klog@baef93d - fix broken links
kubernetes/klog@07b218b - Add go modules files
kubernetes/klog@b33ae69 - Add flag to include file's dir in logs
kubernetes/klog@7c58910 - correct documentation
kubernetes/klog@a4033db - Code Hygene - glog to klog
kubernetes/klog@941d47b - Revert "Fix the log duplication issue for --log-file."
kubernetes/klog@314f6c4 - Update godoc for the default value of logtostderr
kubernetes/klog@7eb35e2 - Fix the log duplication issue for --log-file.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: