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

fix pod hang in PreparingUpdate state when rollback before update hook #1157

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

shiyan2016
Copy link
Member

Ⅰ. Describe what this PR does

fix pod hang in PreparingUpdate state when rollback before update hook

Ⅱ. Does this pull request fix one issue?

fixes #1156

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

@kruise-bot kruise-bot added the size/XS size/XS: 0-9 label Jan 5, 2023
@shiyan2016 shiyan2016 force-pushed the fix/preparingUpdate-hang branch 2 times, most recently from 2d48d31 to d0081e6 Compare January 5, 2023 09:25
@shiyan2016 shiyan2016 changed the title fix pod hang in PreparingUpdate state when rollback before update hook WIP: fix pod hang in PreparingUpdate state when rollback before update hook Jan 5, 2023
Copy link
Member

@hantmac hantmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@shiyan2016 shiyan2016 force-pushed the fix/preparingUpdate-hang branch from d0081e6 to bf0a64c Compare January 5, 2023 10:26
@kruise-bot kruise-bot added size/S size/S 10-29 and removed size/XS size/XS: 0-9 labels Jan 5, 2023
@shiyan2016 shiyan2016 changed the title WIP: fix pod hang in PreparingUpdate state when rollback before update hook fix pod hang in PreparingUpdate state when rollback before update hook Jan 6, 2023
@zmberg
Copy link
Member

zmberg commented Jan 10, 2023

/ok-to-test

@zmberg
Copy link
Member

zmberg commented Jan 11, 2023

/lgtm

@@ -173,6 +173,13 @@ func (c *realControl) refreshPodState(cs *appsv1alpha1.CloneSet, coreControl clo
cs.Spec.Lifecycle.PreNormal == nil ||
lifecycle.IsPodAllHooked(cs.Spec.Lifecycle.PreNormal, pod) {
state = appspub.LifecycleStateNormal
case appspub.LifecycleStatePreparingUpdate:
if clonesetutils.EqualToRevisionHash("", pod, updateRevision) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz add some annotations to explain these codes.

Signed-off-by: shiyan2016 <shiyan20160606@gmail.com>
@shiyan2016 shiyan2016 force-pushed the fix/preparingUpdate-hang branch from 858b71d to d765df7 Compare February 7, 2023 09:12
@kruise-bot kruise-bot added size/M size/M: 30-99 and removed lgtm size/S size/S 10-29 labels Feb 7, 2023
@veophi
Copy link
Member

veophi commented Feb 7, 2023

/lgtm

@zmberg
Copy link
Member

zmberg commented Feb 7, 2023

/approve

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zmberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kruise-bot kruise-bot merged commit 4c65938 into openkruise:master Feb 7, 2023
ppbits pushed a commit to ppbits/kruise that referenced this pull request Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Pod hang in PreparingUpdate state
5 participants