Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rocketchat-mongodb-fix-clustermonitor-role-configmap script is buggy #158

Open
mhkarimi1383 opened this issue Dec 4, 2024 · 0 comments
Open

Comments

@mhkarimi1383
Copy link

Bitnami Chart will run this script on first Pod (not primary one)

So this script should handle that and try to connect to the primary one

failed to add role clusterMonitor to user "rocketchat"; Error: rs0 [direct: secondary] admin> 
MongoServerError: not primary> ... ... ... ... ... ... ... ... Uncaught 
rs0 [direct: secondary] admin> 
rs0 [direct: secondary] admin>

this script will work correctly on initial install, not later upgrades/restarts

I think a better approach would be moving this script to a simple job and waiting for primary before running script (or making a replica set connection to primary node in current approach)

as you can see it's connecting in a direct way witch is incorrect
Problem solved After setting

mongodb:
  initdbScriptsConfigMap: ""

Before setting this we will get restart loops on first mongodb instance after upgrades/restarts when first instance is not primary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant