Skip to content

Commit

Permalink
fix rs member after initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
egegunes authored and jvpasinatto committed Jan 14, 2025
1 parent f2cb3b9 commit 60e5e69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/perconaservermongodb/mgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (r *ReconcilePerconaServerMongoDB) reconcileCluster(ctx context.Context, cr
LastTransitionTime: metav1.NewTime(time.Now()),
})

return api.AppStateInit, nil, nil
return api.AppStateInit, rs.Members, nil
}
defer func() {
if err := cli.Disconnect(ctx); err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/perconaservermongodb/psmdb_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ func (r *ReconcilePerconaServerMongoDB) reconcileReplsets(ctx context.Context, c
for pod, member := range members {
rs.Members[pod] = member
}
log.V(1).Info("Replset members", "rs", replset.Name, "initialized", rs.Initialized, "members", rs.Members)
cr.Status.Replsets[replset.Name] = rs
}
}
Expand Down

0 comments on commit 60e5e69

Please sign in to comment.