mongodb / mongodb-kubernetes-operator

MongoDB Community Kubernetes Operator
Other
1.24k stars 505 forks source link

MongoDB replicaset with PS or PSS setup could not have arbiter added due to crashloop for goal state #1615

Open KarooolisZi opened 2 months ago

KarooolisZi commented 2 months ago

@nammn Hello, I am not able to add arbiter to 2 member replicaset. (Same for 3 member replicaset). After adding, the pod is created however operator throws error about not reaching the goal state. After some time replicaset members go down as readiness probe is failed. What did you do to encounter the bug? Steps to reproduce the behavior:

  1. Changed my CR MongoDB cluster yaml manifest database.yaml spec.arbiters: 0 to spec.arbiters: 1
  2. Use kubectl apply -f database.yaml
  3. Checked MongoDB community operator logs. Observed the debug log stating that none of pods reached goal state.

What did you expect? Arbiter to be added to 2 member replicaset. Both 2 members and 1 arbiter to reach goal state.

What happened instead? Neither members or arbiter could reach goal state. Replicaset stuck in crashloop. Working members become failed after not reaching goal state for some time, too.

Operator Information

Kubernetes Cluster Information

If possible, please include:

❯ k get mdbc NAME PHASE VERSION mongo Running 4.4.0

 - yaml definitions of your MongoDB Deployment(s):
   - `kubectl get mdbc -oyaml`

apiVersion: v1 items:

nammn commented 2 months ago

@KarooolisZi thanks for opening the issue! We will try to have a look at it.

nammn commented 2 months ago

@KarooolisZi can you also please supply the agenthealth status file and agent logs (you can see more in the github issue template on how to retrieve them)

KarooolisZi commented 2 months ago

Hi @nammn updated issue with required information

KarooolisZi commented 2 months ago

@nammn any updates?

KarooolisZi commented 2 months ago

Due to mentioned reason my 3 member set crashed. I can't revive them because first node is created as secondary (they had similar priority) and yet I can't initiate elections as primary is not recreated

KarooolisZi commented 2 months ago

@nammn any updates?

github-actions[bot] commented 1 week ago

This issue is being marked stale because it has been open for 60 days with no activity. Please comment if this issue is still affecting you. If there is no change, this issue will be closed in 30 days.