Skip to content

If zookeeper is not running, then decreasing replicas will make cluster of zookeeper Unrecoverable #398

@stop-coding

Description

@stop-coding

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions