mongodb-community-operator member increase not working

10/5/2021

The mongodb agent never gets healthy when I increase the replica set. If I initially start with 3 members, all 3 members get created successfully. If I decrease, it also works (after a while).

Steps to reproduce: 1. Installed mongodb-community-operator version 0.7.0 clusterwide. 1. Create a mongodb community object with 1 member (see code below). Tested with versions 4.4.0 and 5.0.0 1. wait until pods are running. 1. increase members 1. mongodb-agent from first member never gets healthy. Second member won't be created.

Findings:

I also checked, deploying all pods on one node, to mitigate subnet connection issues. No change. The only (working) way to increase the member count is to delete all pvcs and start a new deployment with the increased member count. But the data is deleted then, so that's not really a workaround.

Here my code for the mongodbcommunity object:

apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
metadata:
  name: my-database
  namespace: my-namespace
spec:
  members: 3
  type: ReplicaSet
  version: "5.0.0"
  security:
    authentication:
      modes: ["SCRAM"]
  users:
    - name: my-database-user
      db: admin
      passwordSecretRef:
        name: my-database-password
      roles:
        - name: clusterAdmin
          db: admin
        - name: userAdminAnyDatabase
          db: admin
        - name: readWrite
          db: my-database
      scramCredentialsSecretName: my-scram
  additionalMongodConfig:
    storage.wiredTiger.engineConfig.journalCompressor: zlib
-- gpm
kubernetes
kubernetes-operator
mongodb

0 Answers