Description
when a cluster of zookeeper is not running for some error, then decreasing replicas will delete pod automatically.
pod exec zookeeperTeardown.sh to connect zookeeper will fail ,then it will not remove node on this cluster of zookeeper.
But the pod have been delete without update zookeeper configure on zoo.cfg
Importance
must-have
Location
ZNODE_PATH="/zookeeper-operator/$CLUSTER_NAME"
CLUSTERSIZE=java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /root/zu.jar sync $ZKURL $ZNODE_PATH
echo "CLUSTER_SIZE=$CLUSTERSIZE, MyId=$MYID"
if [[ -n "$CLUSTERSIZE" && "$CLUSTERSIZE" -lt "$MYID" ]]; then
java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /root/zu.jar remove $ZKURL $MYID
echo $?
fi
Suggestions for an improvement
fix on zookeepercluster_controller.go:reconcileStatefulSet
If ClusterSize decrease, do reconfig remove here