-
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-619 ⁃ No way to gracefully decommission an entire datacenter #125
Comments
If you set CassandraDatacenter to "Stopped" (Stopped = true), it will drain all the nodes and set to pod count to 0. Would that simplify what you want to achieve? |
Hmm maybe! After I stopped the datacenter I should be able to run This could work. I'll experiment with this solution! |
I haven't tested it but I don't think you'd need to do a |
@ErickRamirezAU I tried that and it did seem to drain the nodes, it did not decommission them. (They were left in a DN state)
Because they were drained So this seems like a nice graceful work around to the problem. |
What happened?
I was in the process of migrating an existing cassandra cluster to k8ssandra using the instructions described here: https://docs.k8ssandra.io/tasks/migrate/
After succesfully adding the k8ssandra datacenter to my existing cluster, I wanted to abort the procedure and decomission the k8ssandra cluster again. I tried scaling down the
cassandradatacenter
to size0
howevercass-operator
threw an error saying that the size needs to be at least1
.I then decided to delete the
cassandradatacenter
hoping that would gracefully decomission the datacenter. However instead it just deleted all the pods ands pvc at once and left all the nodes in aDN
state. Luckily I hadn't streamed any data yet between the datacenters and the k8sssandra datacenter was not in use yet, but it was a bit of an awkward bad state to end up in. I had to then manuallynodetool assasinate
each node that was in the k8ssandra datacenter from the old cassandra datacennter.Did you expect to see something different?
I expected it to be possible to set
size
to0
so I can decomission an entire datacenter before deleting it from the cluster.OR deleting a cassandradatacenter that is part of a larger cluster to gracefully decomission all nodes on deletion
How to reproduce it (as minimally and precisely as possible):
Set size to
0
and see that it gets rejected AND delete the cassandradatacenter afterwardsEnvironment
Cass Operator version:
* Kubernetes version information: `kubectl version` * Kubernetes cluster kind:```insert how you created your cluster: kops, bootkube, etc.```* Manifests:```insert manifests relevant to the issue```* Cass Operator Logs:```Insert image tag or Git SHA here
insert Cass Operator logs relevant to the issue here
The text was updated successfully, but these errors were encountered: