From b3d8e1f1c45f3da862e153768a6978939bb127af Mon Sep 17 00:00:00 2001 From: anishakj Date: Mon, 7 Jun 2021 10:56:37 -0700 Subject: [PATCH 1/2] Changing the path of zu.jar Signed-off-by: anishakj --- docker/Dockerfile | 2 +- docker/bin/zookeeperStart.sh | 2 +- docker/bin/zookeeperTeardown.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index f2ec96153..da6959586 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -18,7 +18,7 @@ RUN ./gradlew --console=verbose --info shadowJar FROM ${DOCKER_REGISTRY:+$DOCKER_REGISTRY/}zookeeper:3.6.1 COPY bin /usr/local/bin RUN chmod +x /usr/local/bin/* -COPY --from=0 /zu/build/libs/zu.jar /root/ +COPY --from=0 /zu/build/libs/zu.jar /opt/libs/ RUN apt-get -q update && \ apt-get install -y dnsutils curl procps diff --git a/docker/bin/zookeeperStart.sh b/docker/bin/zookeeperStart.sh index cea321307..11ddbf190 100755 --- a/docker/bin/zookeeperStart.sh +++ b/docker/bin/zookeeperStart.sh @@ -134,7 +134,7 @@ if [[ "$REGISTER_NODE" == true ]]; then ZKCONFIG=$(zkConfig) set -e echo Registering node and writing local configuration to disk. - java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /root/zu.jar add $ZKURL $MYID $ZKCONFIG $DYNCONFIG + java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /opt/libs/zu.jar add $ZKURL $MYID $ZKCONFIG $DYNCONFIG set +e fi diff --git a/docker/bin/zookeeperTeardown.sh b/docker/bin/zookeeperTeardown.sh index a3f6a50de..309d6b782 100755 --- a/docker/bin/zookeeperTeardown.sh +++ b/docker/bin/zookeeperTeardown.sh @@ -38,11 +38,11 @@ set -e MYID=`cat $MYID_FILE` ZNODE_PATH="/zookeeper-operator/$CLUSTER_NAME" -CLUSTERSIZE=`java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /root/zu.jar sync $ZKURL $ZNODE_PATH` +CLUSTERSIZE=`java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /opt/libs/zu.jar sync $ZKURL $ZNODE_PATH` echo "CLUSTER_SIZE=$CLUSTERSIZE, MyId=$MYID" if [[ -n "$CLUSTERSIZE" && "$CLUSTERSIZE" -lt "$MYID" ]]; then # If ClusterSize < MyId, this server is being permanantly removed. - java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /root/zu.jar remove $ZKURL $MYID + java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /opt/libs/zu.jar remove $ZKURL $MYID echo $? fi From 582a58a58c407d82dcc1e1bdc4bd635da12eef4f Mon Sep 17 00:00:00 2001 From: anishakj Date: Mon, 7 Jun 2021 11:00:34 -0700 Subject: [PATCH 2/2] Added the missing file Signed-off-by: anishakj --- docker/bin/zookeeperReady.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/bin/zookeeperReady.sh b/docker/bin/zookeeperReady.sh index 99b90c823..d002bd39d 100755 --- a/docker/bin/zookeeperReady.sh +++ b/docker/bin/zookeeperReady.sh @@ -75,9 +75,9 @@ if [[ "$OK" == "imok" ]]; then ROLE=participant ZKURL=$(zkConnectionString) ZKCONFIG=$(zkConfig) - java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /root/zu.jar remove $ZKURL $MYID + java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /opt/libs/zu.jar remove $ZKURL $MYID sleep 1 - java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /root/zu.jar add $ZKURL $MYID $ZKCONFIG + java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /opt/libs/zu.jar add $ZKURL $MYID $ZKCONFIG exit 0 else echo "Something has gone wrong. Unable to determine zookeeper role."