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 gpus not being considered when counting allocatables #2108

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

ElijahQuinones
Copy link
Member

@ElijahQuinones ElijahQuinones commented Aug 12, 2024

Is this a bug fix or adding new feature?
bug fix to address part of gh #2105 gpus not being considered when counting allocatables.

What is this PR about? / Why do we need it?
We need this PR in order to fix the above referenced bug

What testing is done?
Compared manually to list of gpu instances
and created unit tests for instances mentioned in ticket and for a gpu instance with 4 gpus.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 12, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @ElijahQuinones. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 12, 2024
@torredil
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 12, 2024
@rdpsin
Copy link
Contributor

rdpsin commented Aug 12, 2024

Should we do some manual testing by setting up a cluster with GPU instances?

@ElijahQuinones
Copy link
Member Author

ElijahQuinones commented Aug 13, 2024

Should we do some manual testing by setting up a cluster with GPU instances?

I have manually tested the limit outside of Kubernettes entirely by just spinning up a g4ad.xlarge instance and manually attaching ebs volumes until I hit the limit where all volumes afterwards are stuck in the attaching state this test concluded that 24 volumes could be attached to the g4ad.xlarge which complies with what the documentation provides.

starts at 28
-1 eni
-1 root volume
-1 gpu
-1 instance store
we also end up with 24

Additionally the unit tests for a g4ad.xlarge return the expected value of 24 slots.

however if we feel it would cover more bases I can run the test with a g4ad.xlarge cluster just to make sure there is no gotchas.

…mits unit tests add go doc comment to GetReservedSlotsForInstanceType
Copy link
Contributor

@ConnorJC3 ConnorJC3 left a comment

Choose a reason for hiding this comment

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

I've personally done enough manual testing to be confident it works

Needs squash otherwise lgtm

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

Code Coverage Diff

File Old Coverage New Coverage Delta
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud/volume_limits.go 30.2% 27.1% -3.1

Copy link
Member

@torredil torredil left a comment

Choose a reason for hiding this comment

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

Thanks for including additional unit tests.
/lgtm

@AndrewSirenko
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AndrewSirenko

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 Aug 13, 2024
@ConnorJC3
Copy link
Contributor

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 13, 2024
@k8s-ci-robot k8s-ci-robot merged commit 911b991 into kubernetes-sigs:master Aug 13, 2024
19 checks passed
mpatlasov pushed a commit to mpatlasov/aws-ebs-csi-driver that referenced this pull request Aug 20, 2024
…les (kubernetes-sigs#2108)

* Fix gpus not being considered when counting allocatables

* Parallelize volume limits table generating scripts refactor volume limits unit tests add go doc comment to GetReservedSlotsForInstanceType
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants