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: Mark nodes that are pending deletion in cluster state for scheduling #2477

Merged
merged 5 commits into from
Sep 13, 2022

Conversation

jonathan-innis
Copy link
Contributor

@jonathan-innis jonathan-innis commented Sep 8, 2022

Fixes #

Description

  • Enables pods that are under Expiry with PDBs to schedule a node that will fit all the pods that are on a node marked for deletion rather than slowly trickling the pending pods onto a large number of small nodes

How was this change tested?

  • make test
  • Latency testing with large scale-ups
  • TEST_FILTER=Integration make e2etests

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

Release Note

None

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Sorry, something went wrong.

@netlify
Copy link

netlify bot commented Sep 8, 2022

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 6447a94
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/632007edd1e58d000947e1bf

@jonathan-innis jonathan-innis marked this pull request as ready for review September 8, 2022 19:33
@jonathan-innis jonathan-innis requested a review from a team as a code owner September 8, 2022 19:33
@tzneal
Copy link
Contributor

tzneal commented Sep 9, 2022

This didn't work for me when I pulled this branch and ran it. I have this pdb:

apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: inflate-pdb
  namespace: default
spec:
  maxUnavailable: 5
  selector:
    matchLabels:
      app: inflate

and I scaled up 100 inflate pods (the deployment is modified to use 250m CPU each) that landed on a single 8xlarge node and waited until they got running.

I deleted the node and we did launch an 8xlarge node at first, but there's some interaction with consolidation that isn't correct as when the node was half full, the new 8xlarge was replaced with a 4xlarge.

Original node w/100 pods - ip-192-168-173-189.us-west-2.compute.internal
Replacement node - ip-192-168-135-151.us-west-2.compute.internal

While the pods were slowly moving from the old node to the new node, consolidation tried to replace the new node with a smaller version:

NFO    controller.consolidation        Consolidating via Replace, terminating 1 nodes ip-192-168-135-151.us-west-2.compute.internal/c6g.8xlarge and replacing with a node from types r6g.4xlarge, r6gd.4xlarge, r5.4xlarge, vt1.3xlarge, c5a.4xlarge and 30 other(s)   {"commit": "59f4cf2"}

It looks like consolidation isn't counting the draining pods or it would have known that didn't work.

@jonathan-innis
Copy link
Contributor Author

This didn't work for me when I pulled this branch and ran it. I have this pdb

Yep, that's a complete miss on my side. I updated the PR. Will add a test for your scenario as well

@jonathan-innis jonathan-innis force-pushed the mark-for-deletion branch 7 times, most recently from db8f09d to cd75877 Compare September 12, 2022 21:12
Copy link
Contributor

@tzneal tzneal left a comment

Choose a reason for hiding this comment

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

lgtm

@jonathan-innis jonathan-innis merged commit a29aca4 into aws:main Sep 13, 2022
@jonathan-innis jonathan-innis deleted the mark-for-deletion branch September 13, 2022 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants