From baa2011b4452e826f3e2c950c7a746cccb505427 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Sat, 7 Apr 2018 02:06:13 +0200 Subject: [PATCH] Avoids potential timing issues with broker start --- kafka/10broker-config.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kafka/10broker-config.yml b/kafka/10broker-config.yml index dabc0e27..8c259973 100644 --- a/kafka/10broker-config.yml +++ b/kafka/10broker-config.yml @@ -44,10 +44,9 @@ data: fi } printf '%s\n' "${SEDS[@]}" > /tmp/kafka-init-config.sed - sed -f /tmp/kafka-init-config.sed /etc/kafka-configmap/server.properties > /etc/kafka/server.properties - - echo "Completed initial config. Staying alive to support Kafka 1.1+ dynamic config updates" - tail -f /dev/null + sed -f /tmp/kafka-init-config.sed /etc/kafka-configmap/server.properties > /etc/kafka/server.properties.tmp + [ $? -eq 0 ] && mv /etc/kafka/server.properties.tmp /etc/kafka/server.properties + [ -f /etc/kafka/server.properties ] && echo "Ready for Kafka start" && tail -f /dev/null server.properties: |- ############################# Log Basics #############################