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

Allow Partial Success for ImageGC #44986

Merged
merged 1 commit into from
Apr 27, 2017

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented Apr 27, 2017

Fixes #44951. When the eviction manager is under disk pressure, it first attempts to reclaim disk space by deleting images. However, if there are any errors during the image deletion process, the eviction manager treats that as a failed attempt delete images--even if some were successfully deleted.

This change essentially makes the eviction manager ignore errors during image garbage collection, and instead rely solely on the quantity of resources reclaimed. If image deletion completely fails, for example, then this should still work as it would return 0 bytes freed. This allows for partial success, because any resources freed are counted, regardless of if some images fail to be deleted, for example.

This does not require any changes to the image manager, as the current behavior is already to return the disk space freed along with any errors.

Fixes a bug where pods were evicted even after images are successfully deleted.

cc @dchen1107 @vishh @kubernetes/kubernetes-release-managers

note to reviewers: this is mostly whitespace changes, so it will make more sense in reviewable

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 27, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels Apr 27, 2017
@dashpole
Copy link
Contributor Author

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Apr 27, 2017
@dchen1107 dchen1107 assigned dchen1107 and unassigned pmorie Apr 27, 2017
@dchen1107 dchen1107 added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Apr 27, 2017
@dchen1107 dchen1107 added this to the v1.6 milestone Apr 27, 2017
@dchen1107
Copy link
Member

Since we decided to cherrypick the fix to 1.6 branch, I suggested we include a reasonable release-note for it.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 27, 2017
@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 27, 2017
@dchen1107
Copy link
Member

@k8s-bot gce etcd3 e2e test this

Updated release note lgtm. Thanks

/lgtm

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dashpole, dchen1107

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit e885c77 into kubernetes:master Apr 27, 2017
k8s-github-robot pushed a commit that referenced this pull request Apr 27, 2017
…-upstream-release-1.6

Automatic merge from submit-queue

Automated cherry pick of #44986

Cherry pick of #44986 on release-1.6.

#44986: still consider quantity reclaimed even when errors are
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.6" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

k8s-github-robot pushed a commit that referenced this pull request May 18, 2017
Automatic merge from submit-queue

[Bug Fix] Return quantity freed even when an error exists

bug was added by #44986.  If we get an error from deleteImages, we try and use the bytes freed in a calculation.
That PR changed the behavior from evicting a pod upon error, to panicking because of the nil pointer.

This should fix inode eviction tests

/assign @dchen1107
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. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

None yet

8 participants