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

Internal mongo db does not recover on pod restarts #183

Open
luischre opened this issue Nov 10, 2022 · 0 comments
Open

Internal mongo db does not recover on pod restarts #183

luischre opened this issue Nov 10, 2022 · 0 comments

Comments

@luischre
Copy link
Contributor

Summary

Currently if using the internal mongo db, the deployment works fine. However as soon as some pod of the replicaset has a restart for whatever reason, the replicaset never manages to get functional again.

I've looked into it and it seems to be due to the externalAccess being set to true for the mongo deployment (https://github.com/sorry-cypress/charts/blob/main/charts/sorry-cypress/values.yaml#L350).

Due to this setting MONGODB_ADVERTISED_HOSTNAME is not set and from my understanding this is required for a replicaset to recover (https://github.com/bitnami/charts/blob/main/bitnami/mongodb/templates/replicaset/statefulset.yaml#L237-L240).

I've now come up with the following workaround:

mongodb:
  internal_db:
    enabled: true
  externalAccess:
    enabled: false
  mongoConnectionString: "mongodb://sorry-cypress-2-mongodb-headless:27017/sorry-cypress?replicaSet=rs0"

As disabling the external access causes some sorry-cypress pods to not be able to start up, I also had to adjust the mongo connection string.

What I do not yet get is why the externalAccess is required in the first place? As said I now disabled this and with the adjusted connection string it just seem to work fine. Are there any consequences that I am currently missing?

Otherwise I would propose to adjust the values accordingly.

How to reproduce

Deploy sorry-cypress with an internal mongo db and restart any of the mongo db pods.

Environment

  • sorry-cypress version: '2.4.2'
  • cypress version: '9.2.1'
  • helm chart version: '1.7.9'
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