Description of problem: Deleting the PVC and RBD provisioner leader pod while provisioning is progressing, will leave a stale image. The issue can be seen frequently with thick provisioned volumes. Version-Release number of selected component (if applicable): How reproducible: Always (with thick provisioning) Steps to Reproduce: 1. Start creating a RBD PVC of size 15 GiB. Use thick provision enabled storage class. 2. When step 1 is progressing (PVC in Pending state), delete the csi-rbdplugin-provisioner leader pod. 3. Immediately after step 2 (PVC is still in Pending state), delete the PVC. 4. Wait for the PVC to get deleted. 5. Wait for the corresponding RBD image to get deleted. Actual results: PVC deleted. RBD image is not deleted. Expected results: The RBD image should be deleted. Master Log: Node Log (of failed PODs): PV Dump: PVC Dump: StorageClass Dump (if StorageClass used by PV/PVC): Additional info:
This will need some discussion upstream, as it is hard problem to solve. We either need to sacrifice provisioning speed or leaked volumes.
Upstream issue: https://github.com/kubernetes-csi/external-provisioner/issues/486
Closing deferred, this is no simple fix and requires design an proper integration. Tracking this work via this RFE https://issues.redhat.com/browse/RFE-2505