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 pxc and proxysql instances storage from the CR definition of the pxc cluster #1674

Open
konoox opened this issue Mar 14, 2024 · 3 comments
Labels

Comments

@konoox
Copy link

konoox commented Mar 14, 2024

Report

Cannot scale up pxc and proxysql instances storage from the CR definition of the pxc cluster

More about the problem

If we try to increase the size of the pxc instances storage defined in the spec.pxc.volumeSpec.persistentVolumeClaim.resources.requests.storage CR attribute, the cluster switch to error state because the operator try to update the related attribute in the pxc statefulset but this operation is prevented as we can see from the operator logs :

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

If we try to apply the same operation for the proxysql instances storage defined in the spec.proxysql.volumeSpec.persistentVolumeClaim.resources.requests.storage, nothing happens.

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.

Steps to reproduce

1 - Create a pxc cluster with proxysql section enabled and define a specific storage request size for both pxc and proxysql section
2 - Wait for the cluster to be ready and see that pvc were created with the desired storage sizes
3 - Edit the pxc CR definition by increasing spec.pxc.volumeSpec.persistentVolumeClaim.resources.requests.storage attribute
4 - See the cluster switching to error state and the related log errors from the operator pod. Pvc are not scaled up
5 - Revert the change in the CR definition
6 - The cluster is back to ready state
7 - Edit the pxc CR definition by increasing spec.proxysql.volumeSpec.persistentVolumeClaim.resources.requests.storage attribute
8 - See that nothing happen, operator do not take any action and pvc are not scaled up

Versions

1 - Kubernetes - v1.27.6
2 - Operator - Percona Operator for MySQL based on Percona XtraDB Cluster 1.13.0
3 - Database - MySQL XtraDB 8.0

Anything else?

1 - Kubernetes - v1.27.6
2 - Operator - Percona Operator for MySQL based on Percona XtraDB Cluster 1.13.0
3 - Database - MySQL XtraDB 8.0

@konoox konoox added the bug label Mar 14, 2024
@hors
Copy link
Collaborator

hors commented Mar 14, 2024

Hi @konoox, Scaling of PVC was added to 1.14.0 release. Did you test it with 1.14.0?

@konoox
Copy link
Author

konoox commented Mar 14, 2024

Oh... i didn't see this new version :(
I will test it, thanks

@spron-in
Copy link
Collaborator

@konoox just a note - ProxySQL volume resizing is not supported yet, only PXC.

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

No branches or pull requests

3 participants