-
Notifications
You must be signed in to change notification settings - Fork 66
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
K8SSAND-1180 ⁃ How do we gracefully increase storage capacity via cass-operator while Cass Datacenter, Statefulset etc are in service with incoming workloads #263
Comments
Hi, does your PV provider support PVC volume expansion? |
@burmanm - Yes, the storage class that we are using has the following property. |
@burmanm - Following up to see if there's an update on this? |
Hey, sorry. The process of expanding a PVC with StatefulSets is a bit tricky and involves manual operations (restriction of Kubernetes). Sadly my local instance did not support the feature, but I'll try to create an example shortly with documented steps. |
thnx @burmanm . Is this something on the roadmap of cass-operator project? |
It's a feature we would like to see, but unfortunately has not been scheduled yet. We have identified the steps to resolve the issue, but it will require a bit of time to implement. |
@burmanm Could you provide more details about this? |
@counter2015 you can easily upgrade your storage manually:
Then, your PVCs should automatically get resized by your storage csi. |
@discostur I am not sure if the PVC capactity will be changed by operator after I edit datacenter yaml file. |
@counter2015 no it does not! i edited my datacenter yaml file and nothing was changed in the pvc / pv. So i edited the pvc manually and the storage was resized ... |
The process is actually a bit more involved to do it safely. First, we need to delete the StatefulSet without deleting the pods. This can be done for example with Next, make sure that Now go ahead expand the volume and update the capacity in the PV spec. Create new PVC that will bind to the PV. The name of the PVC needs to be the same as the name of the old one. Lastly, recreate the StatefulSet. The StatefulSet controller find the existing PVCs and pods. The StatefulSet will immediately move into the ready state (assuming the pods are ready). |
@jsanda Is there any risk to edit the pvc size directly ? |
That may work and might be easier than what I prescribed. I would need to do some testing/investigation to be certain. |
prometheus-operator (which uses statetulset for prometheus pod as well) offeris this way. But this does not work for k8scassandra because of admission webhook:
My example: k8ssandracluster:
After that no changes are applied to cassandra cluster due to the error mentioned above. Even if I try to resize my cluster I get the error and nothing happens. |
having the same issue described in previous comment |
I have directly edited the PVCs and restarted the pods in my test environment. Well, nothing is broken and I can see the new size in the PVCs reflected and access the test data. |
Check prometheus-operator resizing manual. Works fine for k8ssandra as well. |
@okgolove I was trying the steps provided on prometheus-operator resizing manual and it worked for me but when i deleted the cluster and tried on a new cluster. It throws the error you mentioned above. Is it still working for you?
|
@chandapukiran have you changed storage size in cluster manifest before recreating? |
@okgolove No, so basically i have created a cluster with a default size and later tried to change the size by trying to modify the cass object |
@chandapukiran ahh, yes. Admission webhok won't let you make this change. I disabled it temporary then modified. |
@okgolove oh ok, could you share me the commands to disable/enable admission webhook |
@chandapukiran how did you install the operator? If via helm chart then just set
Or just delete admission webhook via kubectl |
Thanks @okgolove , i see it is already disabled in my helm chart but I now understand why it worked for me before but not now. I was playing with k8ssandra-operator in another namespace and that was causing the issue. Now I am good. |
Adding the exact steps to be followed for quick reference:
|
Implementation ticket: #602 |
Following the below thread, wanted to get an update:
https://community.datastax.com/questions/12269/index.html
Environment:
┆Issue is synchronized with this Jira Task by Unito
┆friendlyId: K8SSAND-1180
┆priority: Medium
The text was updated successfully, but these errors were encountered: