fix(provisioning): Add ownerRef to provisioned volumes#436
fix(provisioning): Add ownerRef to provisioned volumes#436Gufran wants to merge 1 commit intoopenebs:developfrom
Conversation
Currently the volumes hang around when the node is deleted, which leads to operational toil and alerts. Since the node and the csinode are both gone, it is safe to assume that the actual volume is also lost, in that case we can rely on the built in mechanism to clear the stale references. This is how local-static-provisioner does it as well. Signed-off-by: Mohammad Gufran <dogabhai@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #436 +/- ##
===========================================
- Coverage 98.66% 98.46% -0.20%
===========================================
Files 2 2
Lines 673 979 +306
===========================================
+ Hits 664 964 +300
- Misses 5 8 +3
- Partials 4 7 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
thanks for pointing it out. I'll update our version and see if that helps. any specific reason to not use owner references? |
One downside could be user would have to recreate the CRs if they also move the disk to another node? What about the lvmnode CR btw? I'm probably ok with getting this in, but not enabled by default |
This is much more likely to happen in a cloud infra compared to what I deal with on a daily basis. Didn't occur to me to think about that!
I can update lvmnode as well and put this change behind a config that is disabled by default. Will update the PR soon. |
Fix which i pointed out will work if user deletes PVC whose lvmvolumes are in nodes which are not in the cluster anymore. I think we cleaning up backend volumes when PVC still exist does not seem right. |
Pull Request template
Please, go through these steps before you submit a PR.
Why is this PR required? What issue does it fix?:
Currently the volumes hang around when the node is deleted, which leads to operational toil and alerts. Since the node and the csinode are both gone, it is safe to assume that the actual volume is also lost, in that case we can rely on the built in mechanism to clear the stale references. This is how local-static-provisioner does it as well.
What this PR does?:
Add ownerRef to volumes
Does this PR require any upgrade changes?:
no
If the changes in this PR are manually verified, list down the scenarios covered::
none
Any additional information for your reviewer? :
none
Checklist:
<type>(<scope>): <subject>