[BUG] xtradb operator does not delete PVC after scaling-down leading to resource leak
General
Escalation
General
Escalation
Description
Description If the pxc.size in the spec gets changed, the xtradb operator updates the stateful set size. The operator decreases the size of the statefulset and delete the pod if it sees that the pxc.size decreases. However, the operator does not delete the PVC used by the deleted pod, which leads to storage resource leak.
Fix During each reconcile, we can make the operator list all the PVC used by xtradb and check whether its owner pod is still running. If not, the operator can delete the PVC as long as delete-pxc-pvc finalizer is present.
We are willing to send a PR to deal with the resource leak problem.
Description
If the
pxc.size
in the spec gets changed, the xtradb operator updates the stateful set size. The operator decreases the size of the statefulset and delete the pod if it sees that thepxc.size
decreases. However, the operator does not delete the PVC used by the deleted pod, which leads to storage resource leak.Fix
During each reconcile, we can make the operator list all the PVC used by xtradb and check whether its owner pod is still running. If not, the operator can delete the PVC as long as
delete-pxc-pvc
finalizer is present.We are willing to send a PR to deal with the resource leak problem.