Skip to content

Commit

Permalink
Modifying zoo.cfg on rolling restarts (#231)
Browse files Browse the repository at this point in the history
Signed-off-by: anisha.kj <[email protected]>
  • Loading branch information
anishakj authored Aug 19, 2020
1 parent d88ce7c commit 8e8f8a3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docker/bin/zookeeperStart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,17 @@ fi

ZOOCFGDIR=/data/conf
export ZOOCFGDIR
echo Copying /conf contents to writable directory, to support Zookeeper dynamic reconfiguration
if [[ ! -d "$ZOOCFGDIR" ]]; then
echo Copying /conf contents to writable directory, to support Zookeeper dynamic reconfiguration
mkdir $ZOOCFGDIR
cp -f /conf/zoo.cfg $ZOOCFGDIR
cp -f /conf/log4j.properties $ZOOCFGDIR
cp -f /conf/log4j-quiet.properties $ZOOCFGDIR
cp -f /conf/env.sh $ZOOCFGDIR
else
echo Copying the /conf/zoo.cfg contents except the dynamic config file during restart
echo -e "$( head -n -1 /conf/zoo.cfg )""\n""$( tail -n 1 "$STATIC_CONFIG" )" > $STATIC_CONFIG
fi
cp -f /conf/log4j.properties $ZOOCFGDIR
cp -f /conf/log4j-quiet.properties $ZOOCFGDIR
cp -f /conf/env.sh $ZOOCFGDIR

if [ -f $DYNCONFIG ]; then
# Node registered, start server
Expand Down

0 comments on commit 8e8f8a3

Please sign in to comment.