Possible leaks in cephcsi (question)
- Dominant language
- Go
- Stars
- 1.6k
- Forks
- 617
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 43
Description
# Possible leaks in cephcsi (question)
## General leak
### CreateVolume/CreateSnapshot
* we create a new UUID entry in the omap and we add a mapping between the new UUID and PV Name and we go ahead and create the volume
What if the csi pod is restarted between the new UUID and PV mapping? will this leave a stale entry?
**Note:** We also need to check restart of csi-provisioner container will leave any stale PVC,PV,ceph resource in cluster?
## RBD
### Create Volume
* Reserve omap
* Possible leak as mentioned in the general section?
* Create rbd image
### Create volume from the snapshot
* Reserve omap and create a clone from the snapshot already created
* Only the omap leak can occur
### Create Volume from volume
* Reserve omap
* Possible leak as mentioned in the general problem?
* Create snapshot from rbd image
* Create temp clone from rbd image
* what if there is a csi pod restart here, is this handled?
* Check flatten is required and add a task to flatten the image
* * what if there is a csi pod restart here, is this handled?
* remove the snapshot from the rbd image
* what if there is a csi pod restart here, is this handled?
* what if the snapshot cannot be deleted?
* create a snapshot on temp clone image.
* what if there is a csi pod restart here, is this handled?
* create a final clone from temp clone
* what if there is a csi pod restart here, is this handled?
* Delete snapshot on the temp clone
* what if there is a csi pod restart here, is this handled?
* what if the snapshot cannot be deleted?
### Create snapshot
* Reserve omap
* Possible leak as mentioned in the general section?
* Create snapshot from rbd image
* Create a clone from the rbd image
* what if there is a csi pod restart here, is this handled?
* remove the snapshot from the rbd image
* what if there is a csi pod restart here, is this handled?
* what if the snapshot removal fails?
* create a snapshot on clone image.
* what if there is a csi pod restart here, is this handled?
### Delete Volume
**Note** covered in https://github.com/ceph/ceph-csi/issues/1728?
* Move the image to the trash
* what if there is a csi pod restart here, is this handled?
* Add task to remove the image from trash
* what if there is a csi pod restart here, is this handled?
* Cleanup omap
## CephFS
### Create Volume
* Reserve omap
* Possible leak as mentioned in the general section?
* Create subvolume
### Create volume from the snapshot
* Reserve omap
* Possible leak as mentioned in the general section?
* create a clone from the snapshot already created
### Create Volume from volume
* Reserve omap
* Possible leak as mentioned in the general problem?
* Create snapshot from cephfs subvolume
* Create a clone from a snapshot
* what if there is a restart here is this handled?
* If the clone creation fails and also snapshot deletion fails will this leave a stale snapshot here?
* If the clone is ready remove the snapshot
* what if there is a restart here is this handled?
* what if the snapshot cannot be deleted?
### Create snapshot
* Reserve omap
* Possible leak as mentioned in the general problem?
* Create snapshot subvolume
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.