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

allocate GIDs in increasing order #1182

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

RomanBednar
Copy link
Contributor

Is this a bug fix or adding new feature?

This is a bug fix/followup for: #850

The patch fixes GID allocator and changes allocation to be in descending order. While this would probably not cause any issues it makes sense to stick to he the original GID allocation which used ascending order.

What is this PR about? / Why do we need it?

Existing clusters would start allocating GIDs from highest to lowest which is reversed to what was used before. The range is determined by gidRangeStart and gidRangeEnd parameters of a storage class. This does not pose any risk, however there is no reason to change the ordering (it was changed by mistake).

What testing is done?

Unit tests + manual verification.

StorageClass used:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: efs-sc1
parameters:
  basePath: /dynamic_provisioning
  directoryPerms: "700"
  fileSystemId: fs-07fe814e87e98c836
  gidRangeEnd: "1005"
  gidRangeStart: "1000"
  provisioningMode: efs-ap
provisioner: efs.csi.aws.com
reclaimPolicy: Delete 

GID allocation is ascending with this patch:

fsap-07e068fedfe932c08  /dynamic_provisioning/pvc-7398fc4f-fe53-4f6c-ae59-00df2e96bb4a  1000 : 1000     1000 : 1000 (700)        Available
fsap-009d4d170cef6de9c  /dynamic_provisioning/pvc-0a7e9a7b-8fa1-4257-98bc-bec726a53429  1001 : 1001     1001 : 1001 (700)        Available
fsap-0efb1789cd7ad03a4  /dynamic_provisioning/pvc-91799faa-b1eb-47ff-93f5-6bcb97497a88  1002 : 1002     1002 : 1002 (700)        Available
fsap-04c5f99364e5460ce  /dynamic_provisioning/pvc-dd526a47-4418-43d0-9eb9-cf3cfd0c5792  1003 : 1003     1003 : 1003 (700)        Available
fsap-0e4d38626a6a62b5a  /dynamic_provisioning/pvc-b4f802c4-c750-4dc7-842b-6fc5995850b5  1004 : 1004     1004 : 1004 (700)        Available
fsap-07768681aa37cce5b  /dynamic_provisioning/pvc-80e74fe6-2121-47a2-aa1b-a7feaf2990df  1005 : 1005     1005 : 1005 (700)        Available 

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 9, 2023
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 9, 2023
@mskanth972
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 9, 2023
@mskanth972
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[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 /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 Nov 9, 2023
@mskanth972
Copy link
Contributor

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 9, 2023
@mskanth972
Copy link
Contributor

Hi @RomanBednar, can you squash the commits.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 10, 2023
@RomanBednar
Copy link
Contributor Author

@mskanth972 Sure, done.

@mskanth972
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 10, 2023
@RomanBednar
Copy link
Contributor Author

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 16, 2023
@k8s-ci-robot k8s-ci-robot merged commit 9ac1d62 into kubernetes-sigs:master Nov 16, 2023
8 checks passed
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants