-
Notifications
You must be signed in to change notification settings - Fork 813
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
Add non-negative check on getVolumeLimit() #1542
Conversation
Skipping CI for Draft Pull Request. |
/test all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Suggest providing a minimal reproducible example of Invalid attach limit value -1 cannot be added to CSINode object for "ebs.csi.aws.com" #1361.
- Suggest adding details to What testing is done? section.
Adding reproducible example and test cases for the change. Thanks for the feedback folks! |
Signed-off-by: Gengtao Xu <gengtaox@amazon.com>
35ae236
to
f66f30a
Compare
/lgtm 👍 |
/lgtm |
/hold need to test this on Windows, might expose an existing bug |
/remove-hold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hanyuel, torredil 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 |
Is this a bug fix or adding new feature?
Fix #1361
What is this PR about? / Why do we need it?
When volume attach limit not correct calculated, it may return negative value which is not allowed in the csi/spec
The
-1
return in the issue reflect to metadata_ec2.go, when all available volume attached, the ENI turns to be actually ENI +1 for Nitro instances.Reproduce the issue
On a cluster with aws-ebs-csi-driver installed,
What testing is done?
Unit test added for maximum volume/eni allocated cases
CI test passed