-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
Fix VolumeAttachment garbage collection for migrated PVs #102176
Fix VolumeAttachment garbage collection for migrated PVs #102176
Conversation
Welcome @timebertt! |
Hi @timebertt. 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. |
/cc @Jiawei0227 |
/ok-to-test |
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.
/lgtm
Thanks for the fix! I think this is looking good to me. Just want to understand the issue more, this only happens if there is indeed dangling attachment in the system, right? in a normal sequence, after CSI migration, the Pod should still able to detach this volume?
/retest |
1 similar comment
/retest |
4fe6f5c
to
59b2511
Compare
Yes, this bug is a real edge case, it doesn't happen in a normal sequence. In all cases, where we observed the bug, kube-controller-manager was restarted while an attach/detach operation was in progress, e.g. because a kubernetes/pkg/controller/volume/attachdetach/attach_detach_controller.go Lines 719 to 728 in be58307
If the pod was scheduled on another node, then the Volume won't be detached on the old node as the old This is quite hard to reproduce, because it has to happen in a very precise timing (which in large scale environments can of course happen more frequently). |
/retest |
1 similar comment
/retest |
Thanks a lot! This is very helpful info. |
59b2511
to
6547df8
Compare
6547df8
to
cd37092
Compare
/retest |
1 similar comment
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gnufied, timebertt 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 |
/triage accepted |
…02176-origin-release-1.20 Automated cherry pick of #102176: Fix VolumeAttachment garbage collection for migrated PVs
…02176-origin-release-1.19 Automated cherry pick of #102176: Fix VolumeAttachment garbage collection for migrated PVs
…02176-origin-release-1.21 Automated cherry pick of #102176: Fix VolumeAttachment garbage collection for migrated PVs
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR builds on #101737 to also cleanup dangling
VolumeAttachment
s after completed migration to CSI (like described in #102097).Which issue(s) this PR fixes:
Fixes #102097
Special notes for your reviewer:
/sig storage
I validated the change on our clusters, where we observed the issue (AWS/GCP, k8s v1.18/v1.19). On startup, kube-controller-manager now marks the old
VolumeAttachment
s as uncertain and later detaches them, e.g.:Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: