charts
charts copied to clipboard
MongoDB probes always answers OK when url connection contains true value
Name and Version
bitnami/mongodb master
What steps will reproduce the bug?
- enable TLS (for example)
- have a replica set configuration error
- probs doesn't detect that RS is KO
What is the expected behavior?
Probes should detect that there is a problem with the RS.
What do you see instead?
All probes are OK.
Additional information
mongosh $TLS_OPTIONS --port $MONGODB_PORT_NUMBER --eval 'db.isMaster().ismaster || db.isMaster().secondary' | grep "true"
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&tls=true&tlsCertificateKeyFile=%2Fcerts%2Fmongodb.pem&tlsCAFile=%2Fcerts%2Fmongodb-ca-cert&appName=mongosh+1.5.1
If you make a not silent grep you can see that the URL match due to some 'true' values in parameters.
Maybe something like that should be enough to fix that:
mongosh $TLS_OPTIONS --port $MONGODB_PORT_NUMBER --eval 'db.isMaster().ismaster || db.isMaster().secondary' | grep -v "Connecting to" | grep -q "true"
Thanks for reporting this issue. Would you like to contribute by creating a PR to solve the issue? The Bitnami team will be happy to review it and provide feedback. Here you can find the contributing guidelines.
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Thanks for reporting this issue. Would you like to contribute by creating a PR to solve the issue? The Bitnami team will be happy to review it and provide feedback. Here you can find the contributing guidelines.
Ok I'll try to create a PR this week.
Thanks for the PR, the team will review it and provide feedback