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

Add Additional Details To Pod Eviction Log Messages #279

Merged
merged 4 commits into from
May 14, 2020

Conversation

seanmalloy
Copy link
Member

  • 3a204de - all strategies log error from EvictPod method
  • 55de441 - add pod namespace to pod eviction log messages

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 12, 2020
@seanmalloy
Copy link
Member Author

Looks like the Travis CI tests did not get triggered :-(

@seanmalloy
Copy link
Member Author

Close and re-open to try and make Travis CI work.

@seanmalloy seanmalloy closed this May 12, 2020
@seanmalloy seanmalloy reopened this May 12, 2020
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 12, 2020
In multi-tenant environments it is useful to know which namespace a pod
was evicted from. Therefore log the namespace when evicting pods.

Also, do not log a nil error when successfully evicting pods.
End users should be able to see the detailed error from the EvictPod
method when it fails. Updates all strategies to log the error. The
PodLifeTime strategy already logs this error.
The EvictPod function previously returned a bool and an error. The
function now only returns an error. Callers can check for failure by
testing if the returned error is not nil. This aligns the EvictPod
function with idiomatic Go best practices.

Also, the function name has been changed from EvictPod to evictPod
because it is not used outside the evictions package.
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 14, 2020
@seanmalloy
Copy link
Member Author

@damemi and @ingvagabund PTAL when you have some time. I believe I addressed all of your feedback.

@ingvagabund
Copy link
Contributor

@seanmalloy thanks for addressing all the comments
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 14, 2020
Copy link
Contributor

@damemi damemi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
thanks @seanmalloy

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: damemi, seanmalloy

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 14, 2020
@k8s-ci-robot k8s-ci-robot merged commit 04efe65 into kubernetes-sigs:master May 14, 2020
@seanmalloy seanmalloy deleted the eviction-logs branch May 14, 2020 14:21
@seanmalloy seanmalloy mentioned this pull request May 20, 2020
4 tasks
briend pushed a commit to briend/descheduler that referenced this pull request Feb 11, 2022
…logs

Add Additional Details To Pod Eviction Log Messages
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants