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

Implement dynamically adjustment of NodeDeleteDelayAfterTaint based on round trip time between CA and api-server #6019

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

damikag
Copy link
Contributor

@damikag damikag commented Aug 7, 2023

Implement dynamically adjustment of NodeDeleteDelayAfterTaint based on round trip time between CA and api-server

What type of PR is this?

/kind bug

What this PR does / why we need it:

Since CA and Scheduler are not synced, there could be race condition because scheduler might put pods on tainted nodes for deletion on scale down. Currently the probability of a race condition is reduced by waiting NodeDeleteDelayAfterTaint amount of time before deleting a node after tainting. The value of NodeDeleteDelayAfterTaint affects scale down throughput so this PR makes it dynamic based on the round trip time between CA and api-server.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

When --dynamic-node-delete-delay-after-taint-enabled set to true CA will adjust nodeDeleteDelayAfterTaint based on the round-trip time between CA and api-server. nodeDeleteDelayAfterTaint will be set to 3 times the round-trip time between CA and api-server.

release-note

A new flag(--dynamic-node-delete-delay-after-taint-enabled) is introduced which enables dynamic adjustment of nodeDeleteDelayAfterTaint based on the round-trip time between CA and api-server.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 7, 2023
@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 Sep 1, 2023
@x13n
Copy link
Member

x13n commented Sep 4, 2023

/assign

Copy link
Member

@x13n x13n left a comment

Choose a reason for hiding this comment

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

Looks like gofmting is required:

Please run hack/update-gofmt.sh to fix the following files:
./cluster-autoscaler/core/scaledown/actuation/update_latency_tracker.go

@damikag damikag force-pushed the fix-rc-ca-sched branch 2 times, most recently from 10577b4 to e76699e Compare September 4, 2023 15:54
@damikag damikag force-pushed the fix-rc-ca-sched branch 2 times, most recently from 8a8dfac to e3bb2ce Compare September 8, 2023 10:04
@damikag damikag force-pushed the fix-rc-ca-sched branch 2 times, most recently from 732a966 to 7c0bdec Compare September 8, 2023 12:08
Implement dynamically adjustment of NodeDeleteDelayAfterTaint based on round trip time between ca and apiserver
@x13n
Copy link
Member

x13n commented Sep 8, 2023

Come to think about it, the observed latency is something that may be worth having a metric for. But maybe that can be done as a follow-up change.

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: damikag, x13n

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 8, 2023
@k8s-ci-robot k8s-ci-robot merged commit 9622a50 into kubernetes:master Sep 8, 2023
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. area/cluster-autoscaler 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. 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.

3 participants