Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.5.1
-
None
-
None
-
None
Description
The comment in zkEnv.sh indicates that /etc/zookeeper should be an option for the ZOOCFGDIR but the code beneath it does not look to see if it exists:
# We use ZOOCFGDIR if defined, # otherwise we use /etc/zookeeper # or the conf directory that is # a sibling of this script's directory ZOOBINDIR="${ZOOBINDIR:-/usr/bin}" ZOOKEEPER_PREFIX="${ZOOBINDIR}/.." if [ "x$ZOOCFGDIR" = "x" ] then if [ -e "${ZOOKEEPER_PREFIX}/conf" ]; then ZOOCFGDIR="$ZOOBINDIR/../conf" else ZOOCFGDIR="$ZOOBINDIR/../etc/zookeeper" fi fi
Should this be something like:
if [ "x$ZOOCFGDIR" = "x" ] then if [ -e "/etc/zookeeper" ]; then ZOOCFGDIR="/etc/zookeeper" elif [ -e "${ZOOKEEPER_PREFIX}/conf" ]; then ZOOCFGDIR="$ZOOBINDIR/../conf" else ZOOCFGDIR="$ZOOBINDIR/../etc/zookeeper" fi fi
I am not sure if ZOOBINDIR/../etc/zookeeper is supposed to be an option or a typo but in the default setup ZOOBINDIR/../conf exists so even if it were changed to /etc/zookeeper it would never try to use it.