-
Notifications
You must be signed in to change notification settings - Fork 249
fix: Improve Zookeeper initialization wait logic to support multi url configuration store #671
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -70,8 +70,9 @@ spec: | |||||||||||||||||||||||
| command: ["timeout", "{{ .Values.pulsar_metadata.waitZookeeperTimeout }}", "sh", "-c"] | ||||||||||||||||||||||||
| args: | ||||||||||||||||||||||||
| - | | ||||||||||||||||||||||||
| until nslookup {{ .Values.pulsar_metadata.configurationStore}}; do | ||||||||||||||||||||||||
| sleep 3; | ||||||||||||||||||||||||
| export PULSAR_MEM="-Xmx128M"; | ||||||||||||||||||||||||
| until timeout 15 bin/pulsar zookeeper-shell -server {{ .Values.pulsar_metadata.configurationStore }} ls /; do | ||||||||||||||||||||||||
| echo "configurationStore {{ .Values.pulsar_metadata.configurationStore }} is unreachable... check in 3 seconds ..." && sleep 3; | ||||||||||||||||||||||||
| done; | ||||||||||||||||||||||||
|
Comment on lines
+73
to
76
|
||||||||||||||||||||||||
| export PULSAR_MEM="-Xmx128M"; | |
| until timeout 15 bin/pulsar zookeeper-shell -server {{ .Values.pulsar_metadata.configurationStore }} ls /; do | |
| echo "configurationStore {{ .Values.pulsar_metadata.configurationStore }} is unreachable... check in 3 seconds ..." && sleep 3; | |
| done; | |
| export PULSAR_MEM="-Xmx128M"; | |
| {{- include "pulsar.toolset.zookeeper.tls.settings" . | nindent 12 }} | |
| until timeout 15 bin/pulsar zookeeper-shell -server {{ .Values.pulsar_metadata.configurationStore }} ls /; do | |
| echo "configurationStore {{ .Values.pulsar_metadata.configurationStore }} is unreachable... check in 3 seconds ..." && sleep 3; | |
| done; | |
| volumeMounts: | |
| {{- include "pulsar.toolset.certs.volumeMounts" . | nindent 8 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The readiness probe uses
-server {{ .Values.pulsar_metadata.configurationStore }}directly, but the actual--configuration-storeused later is built viapulsar.configurationStore.connect(which incorporatesconfigurationStorePort). IfconfigurationStorePortis customized (or differs from ZooKeeper’s default 2181), this loop may keep failing even though the configuration store endpoint used for initialization is reachable. Use the same connection string here as the initialization step (and quote it to avoid shell word-splitting).