You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
allow smaller PVC templates when scaling vmstorage out #2822
Is your feature request related to a problem? Please describe
Summary
Allow VMCluster scale-out with smaller PVCs for new vmstorage replicas.
Use case
Let's say, I have three vmstorage replicas with 200Gi PVCs. To spread RAM and load across
more nodes, I want to scale to six replicas without increasing retained data.
New replicas need only 100Gi each. After one retention period, data will be
distributed over all six replicas. Using 200Gi for every new PVC would provision
900Gi total instead of the intended 600Gi: 300Gi unnecessarily.
Reproduction
Create three vmstorage replicas with a 200Gi volumeClaimTemplate.
Change the template to 100Gi and scale to six replicas.
Expected behavior
Keep the existing 200Gi PVCs unchanged and create 100Gi PVCs for new replicas.
Either treat smaller requests for existing PVCs as a no-op, or provide an
explicit option to permit heterogeneous PVC capacities during scale-out.
Actual behavior
The update fails because the operator tries to shrink existing PVCs:
cannot decrease PVC=... size from=200Gi to=100Gi, please check
VolumeClaimTemplate configuration: declined by the operator
Additional context
This behavior was introduced with #2512, which made
declined decreases fail reconciliation. I am not sure whether this should be a
bug report or a feature request. As a bug report, I would ask to revert #2512,
which I am fine with. Alternatively, an option for intentional heterogeneous
PVCs would be useful.
Plan: in modifyPVC (statefulset_pvc_expand.go), when the VolumeClaimTemplate asks for less than the existing PVC, keep the current size and log it instead of returning ErrDeclined. Metadata and volumeAttributesClass changes still get applied, and expansion works as before. New replicas then get the smaller template, which covers the scale-out case here. I'll add test cases and a CHANGELOG entry.
One question: is a log line enough, or should the size mismatch still show up somewhere, like an event or status.reason?
Activity
f41gh7 commentedon Nov 23, 2026
Looks like a bug to me. It's fine to have a bigger PVC due to manual change and it shoudn't block resource update.
Shrinet82 commentedon Nov 24, 2026
Hi @f41gh7, I'd like to pick this up.
Plan: in modifyPVC (statefulset_pvc_expand.go), when the VolumeClaimTemplate asks for less than the existing PVC, keep the current size and log it instead of returning ErrDeclined. Metadata and volumeAttributesClass changes still get applied, and expansion works as before. New replicas then get the smaller template, which covers the scale-out case here. I'll add test cases and a CHANGELOG entry.
One question: is a log line enough, or should the size mismatch still show up somewhere, like an event or status.reason?
Could you assign it to me?