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

[BUG] extra ReadinnesGate with ReCreate updateStrategy #892

Closed
voron opened this issue Jan 17, 2022 · 4 comments · Fixed by #893
Closed

[BUG] extra ReadinnesGate with ReCreate updateStrategy #892

voron opened this issue Jan 17, 2022 · 4 comments · Fixed by #893
Assignees
Labels
kind/bug Something isn't working

Comments

@voron
Copy link
Contributor

voron commented Jan 17, 2022

What happened:
CloneSet pods do not become ready due to ReadinnesGate InPlaceUpdateReady. Pod status shows

    message: corresponding condition of pod readiness gate "InPlaceUpdateReady" does
      not exist.

What you expected to happen:
CloneSet pods are not affected by ReadinnesGate InPlaceUpdateReady when type is ReCreate

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

  • Create s CloneSet with
  updateStrategy:
    paused: true
    type: ReCreate
  • get a couple of pods with added ReadinnesGate InPlaceUpdateReady which doesn't become ready.
    Temporary fix is to enable and re-disable updateStrategy using f.e. these patches:
kubectl patch cloneset test --type='merge' -p '{"spec": {"updateStrategy":{"paused":false}}}'
sleep 5
kubectl patch cloneset test --type='merge' -p '{"spec": {"updateStrategy":{"paused":true}}}'

But I have to toggle paused for every new pod of this CloneSet

Anything else we need to know?:
What I'm trying to achieve is to mimic StatefulSet's updateStrategy OnDelete, where I can change StatefulSet as many times as I need to, but pods are not affected until pod is created after scale up or pod is re-created after delete. That's why I need to pause updateStrategy in CloneSet - I have to ensure that new pod will be re-created after delete with the same name to use existing PVC. At the same time I need to control which pods have to be scaled down instead of latest pods in StatefulSet. PV& PVC auto removal feature of CloneSet is useful too.

Environment:
GKE 1.20

  • Kruise version:
    1.0.0
  • Kubernetes version (use kubectl version):
  • Install details (e.g. helm install args):
    Install via helm with args
installation:
  namespace: kruise-system
  • Others:
@voron voron added the kind/bug Something isn't working label Jan 17, 2022
@FillZpp
Copy link
Member

FillZpp commented Jan 18, 2022

@voron Thanks for reporting. It is an irrational problem.

CloneSet pods are not affected by ReadinnesGate InPlaceUpdateReady when type is ReCreate

Actually, pods should be injected with readinnesGate InPlaceUpdateReady no matter the update type is ReCreate or InPlaceIfPossible, because users can modify the update type any time.

But we should have to refresh the pod state including readiness condition before we check paused and skip to execute update.

@voron
Copy link
Contributor Author

voron commented Jan 24, 2022

JFYI master build with mentioned PR fixed this issue, thank you!

@FillZpp
Copy link
Member

FillZpp commented Jan 26, 2022

JFYI master build with mentioned PR fixed this issue, thank you!

Good! And we have released v1.0.1 which also contains this bugfix. You may just have to upgrade to this latest version.

@voron
Copy link
Contributor Author

voron commented Jan 26, 2022

Yep, tested it on v1.0.1, works perfect.

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

Successfully merging a pull request may close this issue.

2 participants