-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Log scheduling queue movement events #111878
Conversation
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Tue Aug 16 19:37:32 UTC 2022. |
@yuanchen8911: 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/test-infra repository. |
/sig scheduling |
/assign @Huang-Wei |
/retest |
1 similar comment
/retest |
@@ -313,6 +318,7 @@ func (p *PriorityQueue) Add(pod *v1.Pod) error { | |||
if err := p.podBackoffQ.Delete(pInfo); err == nil { | |||
klog.ErrorS(nil, "Error: pod is already in the podBackoff queue", "pod", klog.KObj(pod)) | |||
} | |||
klog.V(5).InfoS("Pod moved", "pod", klog.KObj(pod), "event", PodAdd, "from", "", "to", activeQName) |
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.
nit: maybe specify it's "from" New
(or Incoming
)
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 it New
/retest |
@@ -558,6 +567,7 @@ func (p *PriorityQueue) Update(oldPod, newPod *v1.Pod) error { | |||
return err | |||
} | |||
p.unschedulablePods.delete(usPodInfo.Pod) | |||
klog.V(5).InfoS("Pod moved", "pod", klog.KObj(pInfo.Pod), "event", "PodUpdated", "from", unschedulablePods, "to", activeQName) |
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.
(not related to this line)
Add logging below L564? unschedulable -> backoff
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.
Added additional logging unschedulePods
to backoff
.
/lgtm This PR tries to reveal more details about pods moving among internal queues, which is helpful to debug issues that pods may stay in unschedulablePods for a long time. /hold |
@@ -313,6 +318,7 @@ func (p *PriorityQueue) Add(pod *v1.Pod) error { | |||
if err := p.podBackoffQ.Delete(pInfo); err == nil { | |||
klog.ErrorS(nil, "Error: pod is already in the podBackoff queue", "pod", klog.KObj(pod)) | |||
} | |||
klog.V(5).InfoS("Pod moved between internal queues", "pod", klog.KObj(pod), "event", PodAdd, "to", activeQName) |
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:
klog.V(5).InfoS("Pod moved between internal queues", "pod", klog.KObj(pod), "event", PodAdd, "to", activeQName) | |
klog.V(5).InfoS("Pod moved to an internal queue", "pod", klog.KObj(pod), "event", PodAdd, "queue", activeQName) |
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 Pod moved to an internal scheduling queue
.
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
to queue
.
Fix a typo Address comments Log one more queue event Update pkg/scheduler/internal/queue/scheduling_queue.go Co-authored-by: Aldo Culquicondor <1299064+alculquicondor@users.noreply.github.com> Update pkg/scheduler/internal/queue/scheduling_queue.go Co-authored-by: Aldo Culquicondor <1299064+alculquicondor@users.noreply.github.com> Address comments Remove 'source' from scheudling queue events Update scheduling queue event msg. Update scheduling queue events
Updated the PR description based on the discussion and changes. |
/lgtm |
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.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, Huang-Wei, yuanchen8911 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 |
Thank you, folks! |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Add additional scheduling events for pod movement to an internal scheduling queue to facilitate scheduling troubleshooting.
Some events are mutually exclusive and won't appear in the same scheduling cycle.
Below is an example for a failed scheduling with 3 new queue events. There's a single event
Add to active queue
for a successful pod scheduling.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.: