Closed 1978629634 closed 3 months ago
@pohly I'm facing an issue and would appreciate if you could take a look when you have a chance.
Here's a link to the relevant source code: https://github.com/kubernetes-csi/external-provisioner/blob/33c5c1f8f2f78e7756969cf37c2417c339c4c216/pkg/controller/clone_controller.go#L202-L204
@1978629634: your analysis seems correct to me, a DeepCopy
seems appropriate here. Care to submit a PR?
Here's a link to the relevant source code:
@1978629634: your analysis seems correct to me, a
DeepCopy
seems appropriate here. Care to submit a PR?
Sure, I'd be happy to submit a PR for that fix
/assign
What happened:
If the cloner controller directly updates the PVC reference without using a deep copy and then calls the Update() method, it can lead to a situation where the cached PVC is updated (removing the finalizer), while the actual PVC remains unmodified in case the Update() operation fails.
What you expected to happen:
deep copy before update()
How to reproduce it:
Anything else we need to know?:
Environment:
kubectl version
):uname -a
):