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
Automatically remove orphaned pod's dangling volumes #95301
Automatically remove orphaned pod's dangling volumes #95301
Conversation
Hi @lorenz. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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 storage |
/ok-to-test |
/assign @msau42 @sjenning @derekwaynecarr |
/assign @jingxu97 |
2f73ea2
to
7e9f3c5
Compare
7e9f3c5
to
322202a
Compare
I rebased onto current master, but all K8s tests somehow fail with a merge conflict. |
/cc |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dchen1107, jingxu97, lorenz 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 |
@lorenz: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
/retest |
I think we should cherrypick |
@bobbypage Cherry-picking sounds reasonable as this is a fairly wide-spread issue. |
thanks @lorenz. Do you want to propose cherrypick? If not or you're busy happy to help create cherrypick of this PR myself. Let me know :) |
Hi All, |
Cherrypick for 1.20 created - #100060 |
Cherrypick for 1.19 created - #100104 |
…5301-upstream-release-1.19 Automated cherry pick of #95301: Automatically remove orphaned pod's dangling volumes
…301-upstream-release-1.18 Automated cherry pick of #95301: Automatically remove orphaned pod's dangling volumes
…5301-upstream-release-1.20 Automated cherry pick of #95301: Automatically remove orphaned pod's dangling volumes
What type of PR is this?
/kind bug
What this PR does / why we need it:
This makes Kubelet automatically clean up dangling volumes for orphaned pods and also emits warnings when it does so. This fixes the endless log spam about orphaned volumes (
Orphaned pod <xyz> found, but volume paths are still present on disk
) and replaces it with a single useful message (Removed dangling volume directories for orphaned pod <xyz>
orRemoved dangling subpath directories for orphaned pod <xyz>
). This still allows for debugging issues with volume reconstruction without annoying operators excessively. People are currently using highly unsafe scripts to work around this issue (like #60987 (comment)).As of Kubernetes 1.19 volume reconstruction still sometimes fails just with emptyDirs and secrets and no kubelet restarts.
This is a rewrite of #73799 which also deals with subpaths and uses more K8s utility code.
Which issue(s) this PR fixes:
Fixes #60987 (partially)
Special notes for your reviewer:
Does this PR introduce a user-facing change?: