You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/03/24 19:22:26 UTC

[GitHub] jonpspri commented on a change in pull request #3486: Check zookeeper (not log) to see that kafka's running

jonpspri commented on a change in pull request #3486: Check zookeeper (not log) to see that kafka's running
URL: https://github.com/apache/incubator-openwhisk/pull/3486#discussion_r176917633
 
 

 ##########
 File path: ansible/roles/kafka/tasks/deploy.yml
 ##########
 @@ -84,8 +84,11 @@
       - "{{ config_root_dir }}/kafka/certs:/config"
 
 - name: wait until the kafka server started up
-  shell: docker logs kafka{{ groups['kafkas'].index(inventory_hostname) }}
+  shell:
+    (echo dump; sleep 1) |
 
 Review comment:
   'dump' is the command to zookeeper which causes it to show the list of who's registered, which we then grep to see that the kafka has registered itself.  See documentation at https://zookeeper.apache.org/doc/r3.1.2/zookeeperAdmin.html#sc_zkCommands.  For example, this is the output of `echo dump | nc 172.17.0.1 2181` on my current OpenWhisk test environment:
   ```
   SessionTracker dump:
   Session Sets (3):
   0 expire at Fri Jan 09 22:27:18 GMT 1970:
   0 expire at Fri Jan 09 22:27:20 GMT 1970:
   1 expire at Fri Jan 09 22:27:22 GMT 1970:
   	0x1002de25dd20000
   ephemeral nodes dump:
   Sessions with Ephemerals (1):
   0x1002de25dd20000:
   	/controller
   	/brokers/ids/0
   ```
   The `/brokers/ids/0` is the kafka broker registering.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services