pravega / zookeeper-operator

Kubernetes Operator for Zookeeper
Apache License 2.0
368 stars 207 forks source link

LivenessProbe inconsistent #516

Open astephanh opened 1 year ago

astephanh commented 1 year ago

Description

More often then less the LivenessProbe fails with an empty Return Value (instead of "imok").

clickhouse    0s          Warning   Unhealthy                    pod/zookeeper-2                                                                           Liveness probe failed: + source /conf/env.sh
++ DOMAIN=zookeeper-headless.clickhouse.svc.cluster.local
++ QUORUM_PORT=2888
++ LEADER_PORT=3888
++ CLIENT_HOST=zookeeper-client
++ CLIENT_PORT=2181
++ ADMIN_SERVER_HOST=zookeeper-admin-server
++ ADMIN_SERVER_PORT=8080
++ CLUSTER_NAME=zookeeper
++ CLUSTER_SIZE=3
++ echo ruok
++ nc 127.0.0.1 2181
+ OK=
+ [[ '' == \i\m\o\k ]]
+ exit 1

Importance

should-have

Location

/usr/local/bin/zookeeperLive.sh

Suggestions for an improvement

AS explained here , adding a Timeout to netcat solves the Issue. i've still got occasional False Positives with "-q 1" but zero with "-q 3"

< OK=$(echo ruok | nc 127.0.0.1 $CLIENT_PORT)
---
> OK=$(echo ruok | nc 127.0.0.1 $CLIENT_PORT -q 3)
anishakj commented 1 year ago

@astephanh , This issue is solved with PR https://github.com/pravega/zookeeper-operator/pull/476 could you please check

astephanh commented 1 year ago

Hi,

looks good to me. Could you provide an Docker Image? I tried to build the operator Image, but I could not start the container.

Best Regards Stephan