-
Notifications
You must be signed in to change notification settings - Fork 554
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
GIDs are not allocated correctly above certain volume threshold #1217
Conversation
/test pull-aws-efs-csi-driver-external-test-eks |
/assign @mskanth972 @Ashley-wenyizha |
Hi @RomanBednar can you squash the commits? |
DescribeAccessPointsWithContext call returns only 100 results by default. Since this is used for discovering used GIDs on access points we must not allow listing only a subset of access points. This is because gid allocator relies on this call to filter out used GIDs and getting next *free* GID. If we don't make sure to list every access point it will cause allocator to pick GID that might already be taken.
0761f51
to
16557ce
Compare
@mskanth972 Done. |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mskanth972, RomanBednar 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 |
Hi. Since we are effectively limiting the max value for gid, should the documentation also be updated to reflect that (instead of continuing to refer the 7000000 upper limit)? Or is there any catch and I got this wrong? Thx |
@joaocc There is no new limit being introduced here, this was just a minor bug fix in GID allocations. However there's a limit for number of access points for EFS itself, recently increased from 120 to 1000, documented here: https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region So this patch just makes sure we discover all possible GIDs allocated/used (max 1000) when calling AWS API to see what GIDs are currently used and new ones allocated correctly - this is because the call returns 100 records only by default even if more are present and would confuse GID allocator. Example: now if you set |
Thanks for the clarification. |
I believe you are referring to this documentation - yes it's confusing since the internal limit is not obvious from driver doc. Maybe there's some use case where it makes sense to set higher range, not sure. Feel free to create an issue if you think this should be corrected so one of the maintainers can weight in on this. |
Is this a bug fix or adding new feature?
Bug fix.
What is this PR about? / Why do we need it?
There are two smaller issues addressed in this PR:
EFS client call
DescribeAccessPointsRequest
is limited to 100 results by default, so when more than 100 access points are created for a filesystem we don't get a full listing. Because of this allocator will assign GIDs that are already used which is incorrect.When GID range exceeds the current access point limit, allocator picks the upper range, but it makes more sense to use lower GIDs first starting from
gidRangeStart
/gidMin
.Reproducer:
What testing is done?
Unit tests + manual verification.