-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to disable Pvc Cleaner? #423
Comments
Hi @chenmin1992, Ther is no method to disable the PVC cleaner but the operator does not delete the data for node 0, in any case, so your data is safe. Indeed there may be some corner cases that require more attention(what I'm thinking about is when you scale the cluster down to 1 replica and node 0 is not up-to-date and you can lose data). Also, if the cluster is scaled down its essential to remove the PVC because after a while the data from that PVC become obsolete and when the cluster is scaled back up the replication will fail. Please give me more details of what do you think about how the operator should manage PVCs. |
@AMecea For me the only feature request here would be handling the "node 0 is out of date" case (maybe refuse to scale down to a number that stops the current master?) |
@AMecea No, in my test case, PVC for node 0 is also deleted when deleting the mysqlcluster customresource haodai1. |
Maybe the OwnerReferences delete the PVC associated with node 0. |
Yes, after deleting OwnerReferences, the PVC-0 won't be deleted. |
length of the parameter of ensureVolumeClaimTemplates is always 0 so far. |
Hi @chenmin1992, the PVC should be deleted when the cluster is deleted. That's the intended behavior. If you want to preserve the data then scale the cluster down to zero.
@abh, this is indeed a problem that needs to be addressed and it's more complex. Here is something that I thought about #404 (comment) |
I think it would be nice to have an option like |
我也觉得应该有一个配置选项去控制pvc是否删除 |
…/github.com/docker/distribution-2.8.2incompatible build(deps): Bump github.com/docker/distribution from 2.8.1+incompatible to 2.8.2+incompatible
https://github.com/presslabs/mysql-operator/pull/140/files#diff-fd332df34b6a8aed6f6e0cb14b640f07R203
I just think that PVC should stay or the data will be lost.
I think there would an option that controls the behavior of how the operator manages PVC for data safe purpose.
The text was updated successfully, but these errors were encountered: