-
Notifications
You must be signed in to change notification settings - Fork 189
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
Unable to release finalizer for PVs created via legacy storage class #217
Labels
kind/bug
Categorizes issue or PR as related to a bug.
Comments
Steps for reproduction:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: gp2
parameters:
type: gp2
provisioner: kubernetes.io/aws-ebs
reclaimPolicy: Delete
volumeBindingMode: Immediate
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ebs-claim3
spec:
accessModes:
- ReadWriteOnce
storageClassName: gp2
resources:
requests:
storage: 4Gi
---
apiVersion: v1
kind: Pod
metadata:
name: app3
spec:
containers:
- name: app
image: centos
command: ["/bin/sh"]
args: ["-c", "while true; do echo $(date -u) >> /data/out.txt; sleep 5; done"]
volumeMounts:
- name: persistent-storage
mountPath: /data
volumes:
- name: persistent-storage
persistentVolumeClaim:
claimName: ebs-claim3
|
sunnylovestiramisu
added a commit
to sunnylovestiramisu/external-attacher
that referenced
this issue
Apr 12, 2023
6613c398 Merge pull request kubernetes-csi#223 from sunnylovestiramisu/update 0e7ae993 Update k8s image repo url 77e47cce Merge pull request kubernetes-csi#222 from xinydev/fix-dep-version 155854b0 Fix dep version mismatch 8f839056 Merge pull request kubernetes-csi#221 from sunnylovestiramisu/go-update 1d3f94dd Update go version to 1.20 to match k/k v1.27 e322ce5e Merge pull request kubernetes-csi#220 from andyzhangx/fix-golint-error b74a5120 test: fix golint error aa61bfd0 Merge pull request kubernetes-csi#218 from xing-yang/update_csi_driver 7563d196 Update CSI_PROW_DRIVER_VERSION to v1.11.0 a2171bef Merge pull request kubernetes-csi#216 from msau42/process cb987826 Merge pull request kubernetes-csi#217 from msau42/owners a11216e4 add new reviewers and remove inactive reviewers dd986754 Add step for checking builds b66c0824 Merge pull request kubernetes-csi#214 from pohly/junit-fixes b9b6763b filter-junit.go: fix loss of testcases when parsing Ginkgo v2 JUnit d4277839 filter-junit.go: preserve system error log 38e11468 prow.sh: publish individual JUnit files as separate artifacts git-subtree-dir: release-tools git-subtree-split: 6613c3980d1e418bebb7bc49d64c977cfff85671
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The out-of-tree CSI drivers are still (and forever?) compatible with the legacy (in-tree) provisioners, e.g.
kubernetes.io/aws-ebs
.Provisioning + attaching a PV referencing such a storage class works perfectly fine with solely CSI. However, deleting such a volume is buggy as the external-attacher does not release its finalizer on the related
PersistentVolume
object.It only watches for all
VolumeAttachment
and adds its finalizer to the referencedPersistentVolume
on creation/update. However, when the PV gets deleted it checks whether.spec.csi
is set which is not the case for a PV using a legacy provisioner. It correctly detaches the volume and releases theVolumeAttachment
, though, thePersistentVolume
will stuck forever in the system.The culprit function seems to be
external-attacher/pkg/controller/controller.go
Lines 219 to 224 in 2d2ab15
/kind bug
The text was updated successfully, but these errors were encountered: