Skip to content
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

Remove redundant eviction log message and add "Reason" param to EvictPod #319

Merged

Conversation

damemi
Copy link
Contributor

@damemi damemi commented Jun 9, 2020

Related to the changes in #287, because the PodEvictor logs when a pod is successfully evicted (either in dry-run or normal mode) this message becomes redundant and confusing when in dry run. For example, it currently looks like:

I0528 09:23:48.664691       1 evictions.go:100] Evicted pod in dry run mode: "hello1-54d7977cd-l8wx7" in namespace "test"
I0528 09:23:48.664700       1 pod_antiaffinity.go:50] Evicted pod: "hello1-54d7977cd-l8wx7" because of existing anti-affinity

This extra message doesn't provide much information, though it may be reasonable to add an extra "reason" parameter to podEvictor.EvictPod to give context on what strategy specifically caused the eviction (since all eviction logs now just originate from evictions.go). This includes that change and the log output looks like:

evictions.go:148] Evicted pod: "dedicated-nodes-zf7kh" in namespace "mdame-test" (RemoveDuplicatePods)

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 9, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: damemi

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 9, 2020
@damemi damemi force-pushed the remove-extra-eviction-log branch from d92629a to 9951b85 Compare June 9, 2020 17:35
@damemi damemi changed the title Remove redundant eviction log message Remove redundant eviction log message and add "Reason" param to EvictPod Jun 9, 2020
@seanmalloy
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 9, 2020
@k8s-ci-robot k8s-ci-robot merged commit 305801d into kubernetes-sigs:master Jun 9, 2020
@seanmalloy
Copy link
Member

It looks like the Travis CI e2e tests did not get triggered.

@seanmalloy
Copy link
Member

/kind cleanup

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jun 10, 2020
briend pushed a commit to briend/descheduler that referenced this pull request Feb 11, 2022
…ion-log

Remove redundant eviction log message and add "Reason" param to EvictPod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants