# Cluster in initializing state

**URL:** https://forums.percona.com/t/cluster-in-initializing-state/15445
**Category:** Percona Operator for MongoDB
**Created:** [April 27, 2022, 7:51pm UTC](https://forums.percona.com/t/cluster-in-initializing-state/15445 "2022-04-27T19:51:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ki0](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@ki0](https://forums.percona.com/u/ki0)
#### Post date: [April 27, 2022, 7:51pm UTC](https://forums.percona.com/t/cluster-in-initializing-state/15445/1 "2022-04-27T19:51:22Z")

</div>

Hi,

For a mistake, we did a step down pods from 4 to 3 and when we try to put the config again to 4, we see this in the operator log:

```auto
{"level":"error","ts":1651088303.3957603,"logger":"controller-runtime.controller","msg":"Reconciler error","controller":"psmdb-controller","request":"atani/mongodb-psmdb-db","error":"reconcile StatefulSet for rs0: update StatefulSet mongodb-psmdb-db-rs0: StatefulSet.apps \"mongodb-psmdb-db-rs0\" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden","errorVerbose":"reconcile StatefulSet for rs0: update StatefulSet mongodb-psmdb-db-rs0: StatefulSet.apps \"mongodb-psmdb-db-rs0\" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden\ngithub.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).Reconcile\n\t/go/src/github.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/psmdb_controller.go:366\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:256\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/github.com/go-logr/zapr/zapr.go:128\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:258\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}

```

Do you know why? the cluster can’t change to ready state … i’m thinking to grow up the cluster to 5 but i’m not sure. Any recomendation?  
Cheers.

---

<div class="post-metadata">

### Author: ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)
#### Post date: [June 13, 2022, 8:36am UTC](https://forums.percona.com/t/cluster-in-initializing-state/15445/2 "2022-06-13T08:36:14Z")

</div>

Hey @ki0 , sorry for a delayed response here.

MongoDB requires to have an odd number of voting nodes. This is done to avoid a split problem, where in case of a network split you have 2 nodes on one end and 2 nodes on another end. The question here would be which partition should accept writes?

In case of odd number of nodes you will always have a “bigger” partition to eliminate this question.

Having said that - the recommendation is to always have an odd number of nodes in your cluster, otherwise you might face various issues.

As for Operator and init state - I would need more details about your cluster, version and so on to reproduce it.

---

<div class="post-metadata">

### Author: ![ki0](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@ki0](https://forums.percona.com/u/ki0)
#### Post date: [July 26, 2023, 10:59am UTC](https://forums.percona.com/t/cluster-in-initializing-state/15445/3 "2023-07-26T10:59:34Z")

</div>

Hey @Sergey_Pronin thanks for the answer, i solved the problem upgrading the operator to 1.14.0.

Cheers!!
