-
Notifications
You must be signed in to change notification settings - Fork 807
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
Bugfix: Instances listed under maxVolumeLimits
not taking into account ENIs/Instance storage
#1860
Bugfix: Instances listed under maxVolumeLimits
not taking into account ENIs/Instance storage
#1860
Conversation
Code Coverage DiffThis PR does not change the code coverage |
…t ENIs/Instance storage Signed-off-by: Eddie Torres <[email protected]>
Signed-off-by: Eddie Torres <[email protected]>
61905a1
to
0862ff1
Compare
/retest |
1 similar comment
/retest |
/lgtm |
/retest |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ConnorJC3 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 |
/retest |
Is this a bug fix or adding new feature?
Bugfix
closes #1688
What is this PR about? / Why do we need it?
This PR addresses a bug in the driver where the calculation that subtracts ENIs and Instance store values is bypassed for certain instance types. More specifically, instance types included in
maxVolumeLimits
: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/v1.21.0/pkg/cloud/volume_limits.go#L56-66.As an example,
d3.8xlarge
(nitro instance) reports a value of3
: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/6f2db761cfa352e05483b7f360b4ed9053b382d6/pkg/cloud/volume_limits.go#L57C3-L57C13 even when several ENIs are attached.Following the current logic,
availableAttachments
is equal to the default value ofnitroMaxAttachments=28
when enis and instance store volumes are taken into account. Finally, taking the min ofmaxVolumeLimits
andavailableAttachments
, the value is incorrectly set to 3.With this change,
availableAttachments
is set tomaxVolumeLimits
if necessary before the calculation is performed so that enis and instance store volumes can be correctly taken into account.What testing is done?
make test