diff --git a/hack/.shellcheck_failures b/hack/.shellcheck_failures index b5b1c14911f..a40c3cef403 100644 --- a/hack/.shellcheck_failures +++ b/hack/.shellcheck_failures @@ -85,8 +85,6 @@ ./test/e2e_node/environment/setup_host.sh ./test/e2e_node/gubernator.sh ./test/images/image-util.sh -./test/images/pets/zookeeper-installer/install.sh -./test/images/pets/zookeeper-installer/on-start.sh ./test/images/volume/gluster/run_gluster.sh ./test/images/volume/iscsi/create_block.sh ./test/images/volume/nfs/run_nfs.sh diff --git a/test/images/pets/zookeeper-installer/install.sh b/test/images/pets/zookeeper-installer/install.sh index e769cb0cb25..fbb5d8ddf4c 100755 --- a/test/images/pets/zookeeper-installer/install.sh +++ b/test/images/pets/zookeeper-installer/install.sh @@ -55,10 +55,10 @@ cp "${INSTALL_VOLUME}"/zookeeper/conf/zoo_sample.cfg "${INSTALL_VOLUME}"/zookeep # TODO: Should dynamic config be tied to the version? IFS="." read -ra RELEASE <<< "${VERSION}" -if [ $(expr "${RELEASE[1]}") -gt 4 ]; then +if [ "$(("${RELEASE[1]}"))" -gt 4 ]; then echo zookeeper-"${VERSION}" supports dynamic reconfiguration, enabling it echo "standaloneEnabled=false" >> "${INSTALL_VOLUME}"/zookeeper/conf/zoo.cfg - echo "dynamicConfigFile="${INSTALL_VOLUME}"/zookeeper/conf/zoo.cfg.dynamic" >> "${INSTALL_VOLUME}"/zookeeper/conf/zoo.cfg + echo "dynamicConfigFile=${INSTALL_VOLUME}/zookeeper/conf/zoo.cfg.dynamic" >> "${INSTALL_VOLUME}"/zookeeper/conf/zoo.cfg fi # TODO: This is a hack, netcat is convenient to have in the zookeeper container diff --git a/test/images/pets/zookeeper-installer/on-start.sh b/test/images/pets/zookeeper-installer/on-start.sh index 6b642f5f693..92eadee009b 100755 --- a/test/images/pets/zookeeper-installer/on-start.sh +++ b/test/images/pets/zookeeper-installer/on-start.sh @@ -36,7 +36,7 @@ MY_ID_FILE=/tmp/zookeeper/myid HOSTNAME=$(hostname) while read -ra LINE; do - PEERS=("${PEERS[@]}" $LINE) + PEERS=("${PEERS[@]}" "$LINE") done # Don't add the first member as an observer @@ -56,7 +56,7 @@ echo "" > "${CFG_BAK}" i=0 LEADER=$HOSTNAME for peer in "${PEERS[@]}"; do - let i=i+1 + (( i=i+1 )) if [[ "${peer}" == *"${HOSTNAME}"* ]]; then MY_ID=$i MY_NAME=${peer} @@ -94,10 +94,10 @@ ADD_SERVER="server.$MY_ID=$MY_NAME:2888:3888:participant;0.0.0.0:2181" # Prove that we've actually joined the running cluster ITERATION=0 -until $(echo config | /opt/nc localhost 2181 | grep "${ADD_SERVER}" > /dev/null); do +until echo config | /opt/nc localhost 2181 | grep "${ADD_SERVER}" > /dev/null; do echo $ITERATION] waiting for updated config to sync back to localhost sleep 1 - let ITERATION=ITERATION+1 + (( ITERATION=ITERATION+1 )) if [ $ITERATION -eq 20 ]; then exit 1 fi