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

[release-0.6] WaitForPodsReady: Reset .status.requeueState once the workload is deactivated #2220

Conversation

tenzen-y
Copy link
Member

@tenzen-y tenzen-y commented May 17, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

If the Workload is deactivated, the workload resets the requeueState to avoid a race condition between the kueue-scheduler and the workload controller in the case of the deactivated workload.

When the workload is deactivated by exceeding the backoffLimitCount, the workload is added The workload is deactivated due to exceeding the maximum number of re-queuing retries. I will introduce a dedicated reason in another PR to focus on fixing the bug.

Which issue(s) this PR fixes:

Fixes #2174

Special notes for your reviewer:

This PR is cherry-pick of #2219

The primary difference from #2219 is the criteria to deduce that the Workload is deactivated due to exceeding the backoffLimitCount.

In the v0.7 implementation, the deactivated workload doesn't have the .status.requeuesState.requeueAt since the requeueAt should be reset when the workload was requeued (Requeued=true condition).

// The deactivation reason could be deduced as the maximum number of re-queuing retries if the workload met all criteria below:
//  1. The waitForPodsReady feature is enabled, which means that it has "PodsReady" condition.
//  2. The workload has already exceeded the PodsReadyTimeout.
//  3. The workload already has been re-queued previously, which means it doesn't have the requeueAt field.
//  4. The number of re-queued has already reached the waitForPodsReady.requeuingBackoffLimitCount.

But, in the v0.6 implementation, an empty requeueAt is dropped from the criteria since we never reset the requeueAt and Requeued condition, a new feature for the v0.7.

// The deactivation reason could be deduced as the maximum number of re-queuing retries if the workload met all criteria below:
//  1. The waitForPodsReady feature is enabled, which means that it has "PodsReady" condition.
//  2. The workload has already exceeded the PodsReadyTimeout.
//  3. The number of re-queued has already reached the waitForPodsReady.requeuingBackoffLimitCount.

Does this PR introduce a user-facing change?

Fix a bug that causes the reactivated Workload to be immediately deactivated even though it doesn't exceed the backoffLimit.

@k8s-ci-robot k8s-ci-robot added this to the v0.6 milestone May 17, 2024
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 17, 2024
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 17, 2024
Copy link

netlify bot commented May 17, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 5609e61
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/6654bde9352691000886a8b2

@tenzen-y tenzen-y changed the title WaitForPodsReady: Reset .status.requeueState once the workload is deactivated [release-0.6] WaitForPodsReady: Reset .status.requeueState once the workload is deactivated May 17, 2024
@tenzen-y tenzen-y force-pushed the 0.6-reset-backoff-count-when-reached-requeuing-limit-count branch from 3344b67 to d79a196 Compare May 17, 2024 16:59
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 20, 2024
@tenzen-y tenzen-y force-pushed the 0.6-reset-backoff-count-when-reached-requeuing-limit-count branch from d79a196 to a811079 Compare May 26, 2024 14:55
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 26, 2024
@tenzen-y tenzen-y force-pushed the 0.6-reset-backoff-count-when-reached-requeuing-limit-count branch from a811079 to 7267bb7 Compare May 26, 2024 14:58
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tenzen-y

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

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 26, 2024
@tenzen-y tenzen-y changed the title [release-0.6] WaitForPodsReady: Reset .status.requeueState once the workload is deactivated WIP: [release-0.6] WaitForPodsReady: Reset .status.requeueState once the workload is deactivated May 26, 2024
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 26, 2024
@tenzen-y tenzen-y force-pushed the 0.6-reset-backoff-count-when-reached-requeuing-limit-count branch from 7267bb7 to 70de278 Compare May 27, 2024 11:20
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 27, 2024
@tenzen-y tenzen-y force-pushed the 0.6-reset-backoff-count-when-reached-requeuing-limit-count branch 2 times, most recently from 183fab0 to ef502f0 Compare May 27, 2024 17:06
…ctivated

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@tenzen-y tenzen-y force-pushed the 0.6-reset-backoff-count-when-reached-requeuing-limit-count branch from ef502f0 to 5609e61 Compare May 27, 2024 17:07
@alculquicondor
Copy link
Contributor

still WIP?

@tenzen-y tenzen-y changed the title WIP: [release-0.6] WaitForPodsReady: Reset .status.requeueState once the workload is deactivated [release-0.6] WaitForPodsReady: Reset .status.requeueState once the workload is deactivated May 27, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 27, 2024
@tenzen-y
Copy link
Member Author

still WIP?

@alculquicondor This PR is ready for review right now.
PTAL.

Copy link
Contributor

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 27, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 89e36512bbe041155d132d044739c277a459ee6c

@k8s-ci-robot k8s-ci-robot merged commit ef5eb93 into kubernetes-sigs:release-0.6 May 27, 2024
13 checks passed
@tenzen-y tenzen-y deleted the 0.6-reset-backoff-count-when-reached-requeuing-limit-count branch May 28, 2024 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants