forked from openebs/maya
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cvr, delete): add finalizer to reclaim space on volume delete
This commit reverts a previous commit i.e. openebs#955 There were a few observations (that were expected) due to above commit. CVR used to have finalizers to execute cleanup operations due to delete event of corresponding volume. This is a standard practice in kubernetes community to handle cleanups via reconciliation process. However, we had to remove finalizers as seen in the commit 955 due to various reasons. These were: [1] Inability to delete a openebs system namespace and expect entire openebs to get uninstalled [2] Deletion of cstor volume did not delete CVRs due to the presence of finalizers. This was seen most of the times across various users and platforms. This was not easily reproducible in development environments. With the current release i.e. 0.9.0 some users have started to face issues like space not getting reclaimed even after cstor volumes get deleted successfully. On further analysis, it was found that user had tried following operation: `kubectl delete pvc --all -n some-namespace` which led to deletion of pvc, pv, cv, cvr resources from k8s cluster but corresponding events especially cvr based events were received much later at the controller code. This resulted in `cvr resource not found` and hence these resources were not cleaned up successfully leading to space issues. With this fix we expect original symptoms to recur. However, we plan to provide another fix after the automated test suite is able to discover these issues at will. This next fix will deal only with symptom '2' NOTE: Ability to un-install openebs by deleting openebs system namespace needs to be handled by a higher order logic/process. This is now considered as out of scope w.r.t cvr controller. Signed-off-by: AmitKumarDas <amit.das@mayadata.io>
- Loading branch information
AmitKumarDas
committed
Jun 7, 2019
1 parent
2e1c5e2
commit 07e2414
Showing
3 changed files
with
167 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters