How do I run tools like sstablerepairedset?

Certain tools require that Cassandra is not running such as sstablerepairedset. With K8ssandra, everytime the Java process is killed, the pod restarts it. Is there a workaround here? Alternatively, does anyone know how the incremental repair markers can removed from tables without stopping the Cassandra process?

With K8ssandra, everytime the Java process is killed, the pod restarts it. Is there a workaround here?

There is no work around to avoiding the automatic restart if that is what you are asking. That is standard behavior with pods in Kubernetes. If a container dies or is killed, the kubelet will automatically restart it.

If you want to run sstablerepairedset, you can do it with kubectl exec. Additionally, cass-operator provides the CassandraTask CRD which give a k8s-native interface for executing different operations like rolling restarts and upgradesstables. We could update it to support sstablerepairedset.

Note that docs.k8ssandra.io currently doesn’t cover CassandraTask. My apologies for that. I plan to get the docs updated very soon.

The challenge is that sstablerepairedset is an offline tool so you can’t run it while Cassandra is running and there really isn’t a Kubernetes-way of running any tools that require Cassandra to be offline.

Running it via an init container might be an option.

CassandraTask sounds promising, but I’ll also explore the init container. Can anyone point me to the docs that reference how to add an init container to k8ssandra?

DSE supports ‘nodetool mark_unrepaired’ (nodetool mark_unrepaired) , but unfortunately that isn’t an option with the Apache version.

Hi Mark,

there you go: k8ssandra-operator/docs/injecting-containers-volumes at main · k8ssandra/k8ssandra-operator · GitHub