scylla-code-samples icon indicating copy to clipboard operation
scylla-code-samples copied to clipboard

Scylla readiness probe does not work

Open yuha0 opened this issue 4 years ago • 4 comments

The readiness probe defined in here:

https://github.com/scylladb/scylla-code-samples/blob/0464f547e2dc3e974d62547cb35ae0f4cc96ebc9/kubernetes-scylla/scylla-statefulset.yaml#L58

It uses exec to execute the probe script, which will always return 0.

➤ kubectl get pods scylla-2
NAME       READY   STATUS    RESTARTS   AGE
scylla-2   1/1     Running   0          15m

➤ kubectl exec scylla-2 bash /opt/ready-probe.sh
command terminated with exit code 1

➤ kubectl exec scylla-2 -- bash -c exec /opt/ready-probe.sh
(returned 0 here)

➤ kubectl get pods scylla-2 -ojsonpath='{.spec.containers[].readinessProbe}'
map[exec:map[command:[/bin/bash -c exec /opt/ready-probe.sh]] failureThreshold:3 initialDelaySeconds:15 periodSeconds:10 successThreshold:1 timeoutSeconds:5]

yuha0 avatar Jun 12 '20 16:06 yuha0

@dahankzter is this example relevant? If its out of date we can (should) kill it and direct users to https://github.com/scylladb/scylla-operator

tzach avatar Jun 14 '20 07:06 tzach

It's very much obsolete and we should either change it here or redirect them to the operator repo.

dahankzter avatar Jun 14 '20 19:06 dahankzter

Unless the plan is to make the operator the only way to deploy scylla in k8s, I think a standalone example as a statefulset is still useful.

Also, I took a look at the operator and looks like it uses a sidecar to run nodetool and exposes an http endpoint. That is definitely a nicer interface, but the idea is the same.

yuha0 avatar Jun 15 '20 21:06 yuha0

The idea of the operator isn't to make it impossible the deploy scylla without it but simply to make it easier. It will be hard to keep these examples in sync though as time goes by but personally I don't mind it all.

dahankzter avatar Jun 17 '20 06:06 dahankzter