Skip to content

Commit cd17777

Browse files
pooknullhorsgkech
authored
K8SPSMDB-1231: handle no mongod containers in running state error (#1814)
https://perconadev.atlassian.net/browse/K8SPSMDB-1231 Co-authored-by: Viacheslav Sarzhan <slava.sarzhan@percona.com> Co-authored-by: George Kechagias <geo.kechagias@gmail.com>
1 parent 6860ba9 commit cd17777

File tree

1 file changed

+3
-0
lines changed
  • pkg/controller/perconaservermongodb

1 file changed

+3
-0
lines changed

pkg/controller/perconaservermongodb/mgo.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ func (r *ReconcilePerconaServerMongoDB) reconcileCluster(ctx context.Context, cr
116116

117117
pod, primary, err := r.handleReplsetInit(ctx, cr, replset, pods.Items)
118118
if err != nil {
119+
if errors.Is(err, errNoRunningMongodContainers) {
120+
return api.AppStateInit, nil, nil
121+
}
119122
return api.AppStateInit, nil, errors.Wrap(err, "handleReplsetInit")
120123
}
121124

0 commit comments

Comments
 (0)