-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Kubelet: Periodically reporting image pulling progress in log #26145
Kubelet: Periodically reporting image pulling progress in log #26145
Conversation
I think this is worth a release note. WDYT? |
+1 on release note. |
I marked this for 1.3 milestone since showing the pulling progress improves a lot of the debuggability for both flaky tests and real production. |
case <-ticker.C: | ||
glog.V(2).Infof("Pulling image %q: %q", p.image, p.progress.get()) | ||
case <-p.stopCh: | ||
glog.V(2).Infof("Finish pulling image %q: %q", p.image, p.progress.get()) |
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.
This message implies that pulling succeeded. This could be misleading when PullImage
errors out. Maybe just print "Pulling image" as above
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.
ACK.
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.
Changed to "Stop pulling image".
@ncdc @dchen1107 This PR only reports image pulling progress in kubelet.log, and only reports every 10 seconds.
Given this, should we still add this in release note? Should we shorten the reporting interval to 5 seconds or less? :) |
I think it'd be more "release-note" worthy if we report events. Printing in the log seems like a debugging detail which should not be noticed by most users. |
0ce0cfd
to
151d0ab
Compare
Ok, I agree this doesn't need a release note now 😄 |
@yujuhong Yeah. It is not hard to change the logic to report via events. But then this may become a UX change: if too few progresses sent, the information will be segmented and uninformative; if too many sent, it could be event spam. |
I think it deserve a release note especially for the user who has their own logging system integrated to Kubernetes. They can not only check today's pulling image related events with this change. |
ticker := time.NewTicker(p.interval) | ||
defer ticker.Stop() | ||
for { | ||
// TODO(random-liu): Report as events. |
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.
Note: #19077 tracks exposing image pull progress. Events might not be the best mechanism.
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.
@vishh Yeah. Event is a easily doable approach better than log, but as what you said, it's not the best solution.
Prepull image failed:
Unfortunately the log is not printed properly. I've sent PR #26192 to fix the log, and will file issue with right log if this happens again. @k8s-bot test this issue #IGNORE. |
LGTM |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 151d0ab. |
Automatic merge from submit-queue |
Addresses #26075 (comment) and #26122 (comment).
This PR changes kube_docker_client to log pulling progress every 10 seconds. We can't print all progress messages into the log, because there are too many. So I make it report newest progress every 10 seconds to reduce log spam.
If the image pulling is too slow or stuck, we'll see image pulling progress unchanged or changed little overtime.
The following is the result if I set the reporting interval to 1 second.
Ref image pulling related issue #19077.
@yujuhong @dchen1107
/cc @kubernetes/sig-node