Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kafka-init/wait-for.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ do
;;
--)
shift
CLI="$@"
CLI="$*"
break
;;
--help)
Expand Down
2 changes: 1 addition & 1 deletion kafka/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repository: monasca/kafka
variants:
- tag: 0.9.0.1-2.11-1.1.0
- tag: 0.9.0.1-2.11-1.1.1
args:
KAFKA_VERSION: "0.9.0.1"
SCALA_VERSION: "2.11"
8 changes: 4 additions & 4 deletions kafka/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/ash
# shellcheck shell=dash

set -x

Expand All @@ -23,15 +24,14 @@ export AUTHORIZER_LOG_LEVEL=${AUTHORIZER_LOG_LEVEL:-"WARN"}
GC_LOG_ENABLED=${GC_LOG_ENABLED:-"False"}

first_zk=$(echo "$ZOOKEEPER_CONNECTION_STRING" | cut -d, -f1)
zk_host=$(echo "$first_zk" | cut -d\: -f1)
zk_port=$(echo "$first_zk" | cut -d\: -f2)
zk_host=$(echo "$first_zk" | cut -d ":" -f1)
zk_port=$(echo "$first_zk" | cut -d ":" -f2)

# wait for zookeeper to become available
if [ "$ZOOKEEPER_WAIT" = "true" ]; then
success="false"
for i in $(seq "$ZOOKEEPER_WAIT_RETRIES"); do
ok=$(echo ruok | nc "$zk_host" "$zk_port" -w "$ZOOKEEPER_WAIT_TIMEOUT")
if [ $? -eq 0 -a "$ok" = "imok" ]; then
if ok=$(echo ruok | nc "$zk_host" "$zk_port" -w "$ZOOKEEPER_WAIT_TIMEOUT") && [ "$ok" = "imok" ]; then
success="true"
break
else
Expand Down