You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "ganeshkalyank (via GitHub)" <gi...@apache.org> on 2026/03/28 05:22:54 UTC
[PR] fix: Improve Zookeeper initialization wait logic to support multi url configuration store [pulsar-helm-chart]
ganeshkalyank opened a new pull request, #671:
URL: https://github.com/apache/pulsar-helm-chart/pull/671
Fixes #670
### Motivation
When using a multi-URL configuration store (e.g., zk1:2181,zk2:2181), the wait-zk-cs-ready init container fails because nslookup cannot resolve comma-separated hostnames. This causes initialization to time out even when ZooKeeper is already accessible.
### Modifications
Replaced nslookup with bin/pulsar zookeeper-shell -server <configurationStore> ls /, which supports the full ZooKeeper connection string including multi-URL formats.
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: Improve Zookeeper initialization wait logic to support multi url configuration store [pulsar-helm-chart]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #671:
URL: https://github.com/apache/pulsar-helm-chart/pull/671#issuecomment-4166225927
please check copilot's review comments
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: Improve Zookeeper initialization wait logic to support multi url configuration store [pulsar-helm-chart]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #671:
URL: https://github.com/apache/pulsar-helm-chart/pull/671#discussion_r3004243145
##########
charts/pulsar/templates/pulsar-cluster-initialize.yaml:
##########
@@ -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;
Review Comment:
The readiness probe uses `-server {{ .Values.pulsar_metadata.configurationStore }}` directly, but the actual `--configuration-store` used later is built via `pulsar.configurationStore.connect` (which incorporates `configurationStorePort`). If `configurationStorePort` is 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).
```suggestion
until timeout 15 bin/pulsar zookeeper-shell -server "{{ template "pulsar.configurationStore.connect" . }}" ls /; do
echo "configurationStore {{ template "pulsar.configurationStore.connect" . }} is unreachable... check in 3 seconds ..." && sleep 3;
```
##########
charts/pulsar/templates/pulsar-cluster-initialize.yaml:
##########
@@ -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;
Review Comment:
`wait-zk-cs-ready` now uses `bin/pulsar zookeeper-shell` to probe ZooKeeper, but it doesn’t apply the chart’s ZooKeeper TLS client settings. When `.Values.tls.enabled` and `.Values.tls.zookeeper.enabled` are true, this probe will fail even if the configuration store is reachable over TLS, blocking initialization. Consider including `pulsar.toolset.zookeeper.tls.settings` before invoking `bin/pulsar` (and ensure the initContainer mounts the toolset cert/CA volumes so those settings work).
```suggestion
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 }}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: Improve Zookeeper initialization wait logic to support multi url configuration store [pulsar-helm-chart]
Posted by "ganeshkalyank (via GitHub)" <gi...@apache.org>.
ganeshkalyank commented on PR #671:
URL: https://github.com/apache/pulsar-helm-chart/pull/671#issuecomment-4191778924
@lhotari addressed both the comments. also, assumed that configuration store deployment also uses the same tls settings as zookeeper.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: Improve Zookeeper initialization wait logic to support multi url configuration store [pulsar-helm-chart]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #671:
URL: https://github.com/apache/pulsar-helm-chart/pull/671
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org