youurayy commented on issue #5994: k8s/EKS some Proxies fail to get Broker info 
from Zookeeper
URL: https://github.com/apache/pulsar/issues/5994#issuecomment-579180775
 
 
   in addition to the borker-waiting script above, I'm currently using this to 
wait for ZooKeeper:
   
   `{{- define "pulsar.waitZookeeperReady" -}}`
   `set -o pipefail; CMD="bin/pulsar zookeeper-shell -server {{ template 
"pulsar.fullname" . }}-{{ .Values.zookeeper.component }} ls /admin/clusters"; 
until [ $( $CMD 2>&1 | tail -n 1 | grep -c {{ template "pulsar.fullname" . }} ) 
-eq 1 ]; do echo "waiting"; sleep 3; done;`
   `{{- end }}`
   
   and using it with bash:
   ```yaml
         - name: wait-zookeeper-ready
           image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
           imagePullPolicy: {{ .Values.image.pullPolicy }}
           command: ["bash", "-c"]
           args:
             - >-
               {{ template "pulsar.waitZookeeperReady" . }}
   ```
   
   the fact is that it's still very brittle and should really be done straight 
from Java with the use of java ZK client lib
   
   p.s. my experience with the `nslookup <service>` method above is that it 
sometimes gets completely stuck

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to