-
Notifications
You must be signed in to change notification settings - Fork 40.7k
Adjust preemption event message to do not include preemptor pod metadata #114923
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
Adjust preemption event message to do not include preemptor pod metadata #114923
Conversation
@mimowo: 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 |
a8fb0f0
to
f79a34d
Compare
/retest |
/lgtm Thanks. |
LGTM label has been added. Git tree hash: cada52366f7e507a80bcf0499897f1b1d22adbee
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Huang-Wei, mimowo 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 |
@@ -378,8 +378,8 @@ func (ev *Evaluator) prepareCandidate(ctx context.Context, c Candidate, pod *v1. | |||
return | |||
} | |||
} | |||
fh.EventRecorder().Eventf(victim, pod, v1.EventTypeNormal, "Preempted", "Preempting", "Preempted by %v/%v on node %v", | |||
pod.Namespace, pod.Name, c.Name()) | |||
fh.EventRecorder().Eventf(victim, pod, v1.EventTypeNormal, "Preempted", "Preempting", "Preempted by a pod scheduled by %s on node %v", |
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.
-1
The scheduler name is already part of the Event metadata:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 24s gke.io/optimize-utilization-scheduler Successfully assigned alpha/sample-job-9fq6c-khbf4 to gke-demo-default-pool-938ff563-473d
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.
Good point.
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 19s default-scheduler Successfully assigned default/pause1 to node-1
Normal Preempted 4s default-scheduler Preempted by a pod scheduled by default-scheduler on node node-1
@mimowo it's good to remove the duplicated scheduler-name in event, and then update the cherry-pick PRs.
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.
Fixed, updated the cherry-pick PR by cherry-picking the fix, PTAL.
…23-upstream-release-1.25 Automated cherry pick of #114923: Do not leak cross namespace pod metadata in preemption events
…23-upstream-release-1.26 Automated cherry pick of #114923: Do not leak cross namespace pod metadata in preemption events
…23-upstream-release-1.24 Automated cherry pick of #114923: Do not leak cross namespace pod metadata in preemption events
…23-upstream-release-1.23 Automated cherry pick of #114923: Do not leak cross namespace pod metadata in preemption events
What type of PR is this?
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Part of #114882 (in event)
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: