This repository was archived by the owner on Jan 22, 2022. It is now read-only.

Description
When using the official dotcms/hazelcast:3.9.2-os image in a Deployment/replicaset with more than one replica, the instances of hazelcast do not create a single cluster.
To reproduce:
This can be reproduced locally via docker-compose for simplicity or in a kubernetes cluster.
Via docker-compose:
- Using the docker-compose.yml from here: https://github.com/dotCMS/docker/blob/master/referenceImplementations/03-full_stack/docker-compose.yml
- Run
docker-compose up -d --scale dotcms=0 --scale db=0 --scale elasticsearch=0 --scale elasticsearch-statis=0 --scale hazelcast=3
- Then exec into the pod by running
docker-compose exec hazelcast sh
- From inside the pod run
wget -O- hazelcast:5701/hazelcast/rest/cluster several times.
- Notice the member size reported is always 1. Notice the member reported is always marked with "this".
Via kubernetes:
Given the attached file hazelcast-deployment.yml, which is a stripped down version of
https://github.com/brentgriffin/2018BootcampK8sDemo/blob/master/deployment.yaml with replicas set to 3. And a Kubernetes cluster:
- Run
kubectl apply -f hazelcast-deployment.yml to deploy hazelcast to kubernetes cluster
- After deploy, find the pod names for hazelcast and pick one:
kubectl get pods
- Run
kubectl exec -it {podname} sh
- From inside the pod run
wget -O- hazelcast-svc:5701/hazelcast/rest/cluster several times.
- Notice the member size reported is always 1. Notice the member reported is always marked with "this".