Comments (7)
Expected behavior
When creating new KadaluStorage and using --pv-reclaim-policy=retain flag, the StorageClass ReclaimPolicy should be set to Retain.
- I believe the feature is misunderstood, I don't blame you though 😄 , thanks for raising the issue as this calls for an improvement in the docs
- Assume you have two actors, one is kubernetes storage class (hereafter just sc) another is kadalustorage cr (hereafter just cr)
- The reclaim policy you mentioned in the cr doesn't get carried into sc that kadalu creates by default
- the policy in cr serves different purpose than the policy in sc, let me explain with two usecases
Usecase 1: When a PVC is deleted, unless cluster is deleted you want PV to be retained
Solution: Copy the sc that kadalu creates for a specific cr onto a new sc and set the parameter reclaimPolicy: Retain
, this prohibits removal of cr unless you delete the retained PV(C)s.
Usecase 2: When a PVC is deleted, even when cluster is deleted you want PV to be retained
Solution: You set --pv-reclaim-policy=retain
on cr and this doesn't prohibit cr removal and data is still retained in backend bricks. This provides you an option for recovery
- I believe you are trying to achieve Usecase 1 by using Solution of Usecase 2 which isn't intentionally allowed
from kadalu.
I agree, 100% valid points. Thank you for your engagement on the matter! ❤️ The bug can be closed :)
from kadalu.
Hello!
Thanks for your feedback and for taking a look! :)
So, if I understand correctly - even if the PersistentVolume
is deleted on the Kubernetes layer, you are saying that the actual volume does stay on the KadaluStorage
layer ( would the files be found on, let's say server-cluster-storage-0-0
pod? ).
After the initial deletion of the PVC
, I tried recreating it again and hoped that if the above were true, the new PV
would contain the data from the previous volume, but it has simply created a new PV
.
On the contrary, allowing the StorageClass
to be set to Retain
does make the recovery of the files more generic ( as the old PV
stays and can be reattached to another pod ), but I understand Kudalu does not support it.
Let me know what you think 👍
from kadalu.
would the files be found on, let's say server-cluster-storage-0-0 pod?
- yep, to be exact, they are retained on the backend bricks, for
retain
on cr, it'll just be a no-op from kadalu perspective for delete volume rpc https://github.com/kadalu/kadalu/blob/devel/csi/volumeutils.py#L638-L645
I tried recreating it again and hoped that if the above were true, the new PV would contain the data from the previous volume, but it has simply created a new PV.
- nope, it doesn't work that way, you might want to use the PV via static provisioning but not through PVC, my knowledge on this area reduced a bit, need to recheck
but I understand Kudalu does not support it.
- no, it's a kubernetes feature, every storage class supports it, as mentioned above, recreate a new sc from kadalu created default sc and then use
reclaimPolicy: Retain
in this new sc - it's just that kadalu doesn't provide you an option to mention
reclaimPolicy: Retain
on default sc's, think about it, it's not at all related to storage layer - when that param is set, k8s just doesn't send delete volume rpc
from kadalu.
need to recheck
- I think this is one #765 when I last looked into this area
from kadalu.
Hi!
Thanks that makes sense, it clarified a lot. I can see now why this is not a bug.
Would you say adding a potential ability to set the reclaimPolicy: Retain
on the default sc could be considered a feature upgrade instead?
from kadalu.
Probably not because of below:
- These two are separate concerns with a clear owner, i.e, kadalu vs kubernetes, so don't want to club
- Adding a separate option in cr might work but we have to take more decisions unecessarily
- Creating a new sc is one time task which doesn't warrant reconciliation
Basically I can see the appeal, at the same time, don't want to introduce yet another option for a standalone feature, pls excuse.
from kadalu.
Related Issues (20)
- [Need Help]When I upload a file directly to the server's mount path of kadalu pvc, the file cannot be identified in the corresponding pod. HOT 5
- [Bug]: nomad controller exception HOT 2
- [Bug]: Over-provisioning stops working when one of the PVC is resized HOT 6
- [Bug]: Failed to pull image "docker.io/library/busybox" HOT 8
- [Bug]: Failed to mount device - not a block device HOT 6
- [Bug]: kadalu-operator can't response prometheus metrics from `/metrics`, except `/metrics.json` HOT 2
- [Bug]: Storage not created HOT 2
- [Bug]: Kadalu upgrading not working properly and PV data not correct HOT 2
- [Bug]: kadalu-operator.storage missing, how to add performance options HOT 8
- 3 node cluster - Arbiter volume still becomes unavailable temporarly when one node is rebooted HOT 3
- [RFE]: Can't create a volume via the kadalu cli not using kubernetes HOT 3
- [Bug]: HOT 1
- kubernetes.io/csi: attacher.MountDevice failed to create newCsiDriverClient: driver name kadalu not found in the list of registered CSI drivers HOT 3
- [Bug]: Error "Failed to open socket connection" while binding PVC HOT 4
- [Bug]: CSI: Sending SIGHUP to main.py only works once
- [Bug]: restart kadalu-csi-nodeplugin daemonset would make current gfs mount unavailable. HOT 2
- [Bug]: Frequent exceptions in Operator: "Expired: too old resource version: 1058643076 (1578740144)"
- [Bug]: Exception in Operator when name of added KadaluStorage starts with name of existing KadaluStorage HOT 2
- [RFE]: Mounting multiple GlusterFS volumes fails if referencing one or more missing volumes on the server. HOT 2
- [Bug]: ResourceExhausted desc = No Hosting Volumes available, add more storage HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kadalu.