charts icon indicating copy to clipboard operation
charts copied to clipboard

[rabbitmq-cluster-operator] split brain after installation of 3 node cluster

Open simakji opened this issue 2 years ago • 7 comments

Name and Version

bitnami/rabbitmq-cluster-operator 4.2.10

What architecture are you using?

amd64

What steps will reproduce the bug?

I try to install 3 node RMQ cluster via rabbitmq-cluster-operator 4.2.10 to Kubernetes cluster, Azure cloud:

  1. Install operator: helm upgrade -i rabbitmq-operator rabbitmq-cluster-operator -n "rmq" --version "4.2.10" --repo https://charts.bitnami.com/bitnami --wait
  2. Install cluster: kubectl apply -f k8s/definition.yaml
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
  name: rabbitmqcluster-sample
  namespace: rmq
spec:
  replicas: 3
  persistence:
    storageClassName: azurefile
    storage: 20Gi

What do you see instead?

I expect RMQ cluster to be formed, but I got 2 clusters, one with node 0, a second with nodes 1 and 2. I repeated the installation a few times, but the result was still the same. When I turned on debug logs, the cluster was formed correctly. When I tried chart version 3.20.1 the cluster was formed correctly as well (without debug logs on).

Additional information

rmq-0 cluster status:

$ rabbitmqctl cluster_status
Cluster status of node rabbit@rabbitmqcluster-sample-server-0.rabbitmqcluster-sample-nodes.rmq ...
Basics

Cluster name: rabbitmqcluster-sample
Total CPU cores available cluster-wide: 4

Disk Nodes

rabbit@rabbitmqcluster-sample-server-0.rabbitmqcluster-sample-nodes.rmq

Running Nodes

rabbit@rabbitmqcluster-sample-server-0.rabbitmqcluster-sample-nodes.rmq

rmq-1 cluster status:

$ rabbitmqctl cluster_status
Cluster status of node rabbit@rabbitmqcluster-sample-server-1.rabbitmqcluster-sample-nodes.rmq ...
Basics

Cluster name: rabbitmqcluster-sample
Total CPU cores available cluster-wide: 8

Disk Nodes

rabbit@rabbitmqcluster-sample-server-1.rabbitmqcluster-sample-nodes.rmq
rabbit@rabbitmqcluster-sample-server-2.rabbitmqcluster-sample-nodes.rmq

Running Nodes

rabbit@rabbitmqcluster-sample-server-1.rabbitmqcluster-sample-nodes.rmq
rabbit@rabbitmqcluster-sample-server-2.rabbitmqcluster-sample-nodes.rmq

simakji avatar May 22 '24 14:05 simakji

Hi @simakji,

I'm sorry but I haven't been able to reproduce this issue. In my case, several attempts to freshly install rabbitmq with 3 nodes, the cluster was not split:

Disk Nodes

rabbit@rabbitmqcluster-sample-server-0.rabbitmqcluster-sample-nodes.default
rabbit@rabbitmqcluster-sample-server-1.rabbitmqcluster-sample-nodes.default
rabbit@rabbitmqcluster-sample-server-2.rabbitmqcluster-sample-nodes.default

Could you please provide more details about your case? Maybe there were some residual PVCs from previous deployments? Did you find anything in the container logs?

migruiz4 avatar May 30 '24 14:05 migruiz4

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] avatar Jun 15 '24 01:06 github-actions[bot]

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

github-actions[bot] avatar Jun 21 '24 01:06 github-actions[bot]

I can confirm the exact same problem with chart 4.3.25, these two are switching with one another and I never have 3 at the same time. @migruiz4 can you please advice?

---
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
  name: rabbitmq
  namespace: dev
spec:
  replicas: 3

image image

I've upgraded from 3.x but I've deleted the chart, pv, configMaps, crds, everything I found related and I still have the feeling issue is due to "old" data somewhere, how can I "hard prune" old rabbit data (raft, etc) like it was never installed?

99hops avatar Oct 24 '24 10:10 99hops

This is a recurring issue for us. Sometimes the cluster starts with a split brain and I am unable to determine why or how to reconcile without restarting the entire cluster .

chrrlesWork avatar Nov 27 '24 08:11 chrrlesWork

@chrrlesWork Delete PVCs and kill all pods at least I do it this way and then recreate transports etc. But split brain is due to storage (lost consensus)..

99hops avatar Nov 27 '24 08:11 99hops

@chrrlesWork Delete PVCs and kill all pods at least I do it this way and then recreate transports etc. But split brain is due to storage (lost consensus)..

Unfortunately this does not solve the problem. Thanks for the suggestion though 👍

chrrlesWork avatar Jan 14 '25 09:01 chrrlesWork