Skip to content
New issue

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

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

Already on GitHub? # to your account

Upgrading from 0.7.9 to 0.8.1 causes crashlooping #1349

Closed
laurivosandi opened this issue Aug 9, 2023 · 5 comments
Closed

Upgrading from 0.7.9 to 0.8.1 causes crashlooping #1349

laurivosandi opened this issue Aug 9, 2023 · 5 comments

Comments

@laurivosandi
Copy link

What did you do to encounter the bug?
We have couple MongoDB instances managed by MongoDB Community Kubernetes Operator. Everything works as expected with 0.7.9. Yesterday tried upgrading to 0.8.1 which resulted all instances having a crashlooping pod

What did you expect?
No surprises

What happened instead?
The very first pod in the statefulset which was being rolled out kept crashlooping. I couldn't pinpoint a specific error in the instance or operator logs.

Screenshots
Didn't manage to get there, as I rolled back to 0.7.9

Operator Information

  • Operator Version: 0.8.1
  • MongoDB Image used: 5.0.9 and 6.0.3 both

Kubernetes Cluster Information

  • Distribution: AWS EKS
  • Version: 1.25.9
  • Image Registry location: quay.io

Additional context
Will attempt upgrade again in a sandbox environment to provide logs.

@laurivosandi
Copy link
Author

This might be related to #1344 , we have dedicated nodes for persistent storage (toleration+nodeSelector)

@mircea-cosbuc
Copy link
Member

mircea-cosbuc commented Aug 9, 2023

@laurivosandi Thank you for raising this, we're preparing a release with the fix (#1346). Interesting to note, in the issue you mentioned, there was no crashloop, just the reconciler adding tolerations to the statefulset and not completing. It would be useful to see logs, to understand if it's the same issue.

@laurivosandi
Copy link
Author

Gave 0.8.2 a try and I am getting

2023-08-14T17:46:49.437Z	ERROR	controllers/mongodb_status_options.go:104	Error deploying MongoDB ReplicaSet: error creating/updating StatefulSet: error creating/updating StatefulSet: StatefulSet.apps "logmower-mongodb" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden

Generally speaking I've come to the conclusion that database operators should manage databases directly and avoid StatefulSet altogether. Just take a look at what CloudNativePG guys are doing

@github-actions
Copy link
Contributor

This issue is being marked stale because it has been open for 60 days with no activity. Please comment if this issue is still affecting you. If there is no change, this issue will be closed in 30 days.

@github-actions github-actions bot added the stale label Oct 25, 2023
Copy link
Contributor

This issue was closed because it became stale and did not receive further updates. If the issue is still affecting you, please re-open it, or file a fresh Issue with updated information.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants