-
Notifications
You must be signed in to change notification settings - Fork 40.7k
[FG:InPlacePodVerticalScaling] Add debug log, when drop pod update message and only old update is processed #129539
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
base: master
Are you sure you want to change the base?
Conversation
|
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Welcome @zanzan-wang! |
Hi @zanzan-wang. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zanzan-wang The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
pkg/kubelet/pod_workers.go
Outdated
@@ -964,6 +964,7 @@ func (p *podWorkers) UpdatePod(options UpdatePodOptions) { | |||
select { | |||
case podUpdates <- struct{}{}: | |||
default: | |||
klog.V(4).InfoS("Pending update already queued", "podUID", podUID, "updateType", options.UpdateType) |
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.
Why do we need this log content? Will this cause kubelet to have too many useless logs?
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.
Thanks for your review.
We think that if the pod update message directly discarded without processed, it is necessary to have exception logs. This exception does not occur frequently.
Log level is defined as 4, not a high log level.
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.
We think that if the pod update message directly discarded without processed
Isn't it discarded when there is another pending update waiting in the channel? If so, what additional information does this message provide?
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.
yes, when there is another message in process, the pending message will drop.
When this happen, kubelet should give user some clue about this. Kubelet log maybe neccessary.
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.
Or you mean "Pending update already queued", this description is not proper?
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.
We meet it when test the InPlacePodVerticalScaling feature, but we think it is common for others.
When the interval between two patch command is relatively small, the adjustment may not successful. This log can help us quickly identify the reason.
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.
Do you mean that pod worker would process one update at the same time new update comes and the new one would be dropped? This is disturbing and signals about some bug/race in my opinion.
Let's see what other reviewers say.
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.
yes, because the channel buffer is 1: podUpdates = make(chan struct{}, 1)
We check some other channel process, the logic are same. If cannot process the message because buffer is full, then drop it.
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.
We meet it when test the InPlacePodVerticalScaling feature, but we think it is common for others.
/cc @tallclair @vinaykul
@zanzan-wang can you provide some more info about the problem you met with In Place update? What's the impact?
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.
Some times our App will send several Pod resize requests in the short time.
If the previous update message not finish, the new pod resize request will be dropped without any warning.
We can not easliy identified that it is dropped or have other process error.
This log could help us to debug well.
/easy cla |
Hey @zanzan-wang please sign the CLA before raising a PR |
/easy cla |
pkg/kubelet/pod_workers.go
Outdated
@@ -964,6 +964,7 @@ func (p *podWorkers) UpdatePod(options UpdatePodOptions) { | |||
select { | |||
case podUpdates <- struct{}{}: | |||
default: | |||
klog.V(4).InfoS("Pending update already queued", "podUID", uid, "updateType", options.UpdateType) |
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.
klog.V(4).InfoS("Pending update already queued", "podUID", uid, "updateType", options.UpdateType) | |
klog.V(4).InfoS("Pending update already queued", "pod", klog.KRef(ns, name), "podUID", uid, "updateType", options.UpdateType) |
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.
Thanks for your suggest, I will update it later
It sounds valid. |
Can you help review this, thanks! |
@zanzan-wang Please, squash commits into one. /release-note none |
/release-note-none |
c333d20
to
0b4ae7f
Compare
Add debug log, when drop pod update message update according to suggestion
/ok-to-test |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/cc @dchen1107 @wzshiming @bart0sh @SergeyKanzhelev |
/remove-lifecycle rotten |
@tallclair based on description it seems that this is a bigger issue, not simply the lack of a log message:
/retitle [FG:InPlacePodVerticalScaling] Add debug log, when drop pod update message and only old update is processed |
As current code application, pod resize will be finally applied according to the last pod resize configuration(even though the requests in the middle that couldn't be processed in time were dropped), it seems reasonable. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Add debug log, help user get the information, when kubelet drop pod update message.
Which issue(s) this PR fixes:
Fixes #129518
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: