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

Cannot scale up mongodb instances storage from the CR definition of the psmdb cluster #1482

Open
konoox opened this issue Mar 15, 2024 · 2 comments

Comments

@konoox
Copy link

konoox commented Mar 15, 2024

Proposal

If we try to increase the size of the replset mongodb instances storage defined in the spec.replsets[*].volumeSpec.persistentVolumeClaim.resources.requests.storage or spec.sharding.configsvrReplSet.volumeSpec.persistentVolumeClaim.resources.requests.storage CR attributes, the operator is not able to update the related replset statefulsets and pvc as we can see from its logs :

"Forbidden: updates to statefulset spec for fields other than …"

As far as I know, the only way to scale up the storage size of these instances is to directly update the related pvc definition, assuming that these pvc are provided by storageclasses allowing the volume expansion of course. But this is not very convenient as the CR definition and related statefulsets are not updated behind.

It would be a great improvement to allow volume expansion from the CR definition by creating external pvc attached to the pod using Claims As Volumes method as implemented with the PostgreSQL operator instead of the dynamic pvc creation from statefulset definition with the Volume Claim Templates method.

Use-Case

Steps to reproduce this issue :
1 - Create a psmdb cluster with one replset configure with its storage size
2 - Wait for the cluster to be ready and see the newly created pvc with the desired storage size
3 - Try to scale up the instances by increasing spec.replsets[0].volumeSpec.persistentVolumeClaim.resources.requests.storage attribute in the CR definition
4 - See that the pvc storage size is not updated because the operator is unable to update the related statefulset definition as mentioned in its logs

Is this a feature you are interested in implementing yourself?

No

Anything else?

No response

@hors
Copy link
Collaborator

hors commented Mar 15, 2024

@konoox we have a plan to add this feature only in one of the next PSMDBO releases. Now only the PXC operator supports it.

@spron-in
Copy link
Collaborator

spron-in commented Mar 25, 2024

This is the corresponding JIRA ticket: https://perconadev.atlassian.net/browse/K8SPSMDB-733

@konoox meanwhile it is possible to scale the storage through a few manual steps: https://www.percona.com/blog/percona-operator-volume-expansion-without-downtime/

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

No branches or pull requests

3 participants