Skip to content

[BUG] When the cloneset volumeClaimTemplates are modified, the newly expanded old version pod will fail to create. #1872

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

Open
bwj1993 opened this issue Dec 31, 2024 · 5 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@bwj1993
Copy link

bwj1993 commented Dec 31, 2024

What happened:
When I reduce the volumeClaimTemplates list of the cloneset from two to one, while also increasing the replicas, and setting the partition to replicas, the creation of the pod gets stuck. This is because the volumeClaimTemplates information is not saved in the controllerrevision, resulting in the generated old version of the pod having only a volume mount, but no volume

Additionally, the native statefulset does not allow modifications to the volumeClaimTemplates field.
5ee6e081297e6efc5f139d2751356d55

What you expected to happen:

  1. Successfully create an old version of the pod.

How to reproduce it (as minimally and precisely as possible):

  1. Create a cloneset with a volumeClaimTemplates field, which has two elements.
  2. Remove one element from the volumeClaimTemplates in the cloneset, while simultaneously increasing the replicas, and setting the partition to replicas.
  3. The creation of the pod gets stuck.

Anything else we need to know?:

Environment:

  • Kruise version: 1.4
  • Kubernetes version (use kubectl version): 1.16
  • Install details (e.g. helm install args):
  • Others:
@bwj1993 bwj1993 added the kind/bug Something isn't working label Dec 31, 2024
@bwj1993 bwj1993 changed the title [BUG] When I reduce the volumeClaimTemplates list of the cloneset from two to one, while also increasing the replicas, and setting the partition to replicas, the creation of the pod gets stuck. This is because the volumeClaimTemplates information is not saved in the controllerrevision, resulting in the generated old version of the pod having only a volume mount, but no volume [BUG] When the cloneset volumeClaimTemplates are modified, the newly expanded old version pod will fail to create. Dec 31, 2024
@HURUIZHE
Copy link

HURUIZHE commented Mar 4, 2025

What's the current progress?

@furykerry
Copy link
Member

PTAL @ABNER-1

@ABNER-1
Copy link
Member

ABNER-1 commented Mar 4, 2025

Hi, @HURUIZHE @bwj1993
Currently, volumeClaimTemplates only support the latest versions of PVCs. If you modify volumeClaimTemplates and then attempt to request an older PVC along with an older Pod, this will not be supported.

In the current version, we advise against modifying both PVCs and the number of replicas simultaneously to avoid such issues.
In future versions, we plan to introduce version tracking for volumeClaimTemplates. This feature may be available in version 1.10 or 2.0.

We warmly welcome contributions from the community to help implement this capability.

@ABNER-1 ABNER-1 assigned ABNER-1 and unassigned FillZpp Mar 4, 2025
@bwj1993
Copy link
Author

bwj1993 commented Mar 7, 2025

When is version 1.10 or 2.0 expected to be released?

@ABNER-1 ABNER-1 added this to the 2.0 milestone Apr 11, 2025
@ABNER-1
Copy link
Member

ABNER-1 commented Apr 11, 2025

I think it might be in December 2025. @bwj1993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants