Skip to content
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

Why are the samples using /hazelcast/health/node-state for OpenShift/Kubernetes readiness & liveness probe? #426

Closed
yihtserns opened this issue May 28, 2020 · 2 comments
Assignees
Labels

Comments

@yihtserns
Copy link

yihtserns commented May 28, 2020

HttpGetCommandProcessor (assuming this is the one that handles /hazelcast/health/node-state) will return HTTP 503 if and only if NodeState=SHUT_DOWN.

I have a few questions about this:

  1. When liveness probe gets HTTP 503, it will then attempt to kill and restart the container in the Pod. Why do we want to restart the container when the NodeState=SHUT_DOWN?
  2. Remove readinessProbe form OpenShift templates #241 removed readiness probe from the OpenShift sample, but it was reinstated in the latest OpenShift samples. Why is that?
  3. Up until https://github.com/hazelcast/hazelcast-docker/tree/v3.10/hazelcast-kubernetes, there is a readiness.sh that will only mark the Pod as ready, if and only if ClusterSafe=TRUE. Seeing how readiness.sh has been removed & none of the samples are using /hazelcast/health/cluster-safe as readiness probe, does that mean a Hazelcast node is always ready when it has started up?
@leszko
Copy link

leszko commented Jun 3, 2020

@yihtserns Thanks for the questions.

  1. The livenessProbe should actually point to /hazelcast/health endpoint. There is an open issue for that: Change the default livenessProbe endpoint to /health charts#83

  2. To be honest I don't remember why we removed it, but it might have been the problem that we used Deployment which started all PODs at the same time. Now, we recommend using StatefulSet and the readinessProbe should be in place.

  3. We actually introduced a new endpoint /hazelcast/health/ready and this should be used for readinessProbe (here is an example).

@yihtserns
Copy link
Author

@leszko Thanks for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants