Gluster FS provisioner giving out the same GID for multiple PVC requests
Gluster FS provisioner giving out the same GID for multiple PVC requests.... Seemingly ad infinitum.
Version
oc version
oc v3.10.0+0c4577e-1 kubernetes v1.10.0+b81c8f8 features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://[redacted]:443 openshift v3.10.0+8a70964-87 kubernetes v1.10.0+b81c8f8
Steps To Reproduce
Create new PVC:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pvc-broken
annotations:
volume.beta.kubernetes.io/storage-class: "glusterfs-storage"
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Mi
Current Result
New PV created by auto provisioner consumes GID of existing PV
Expected Result
New PV is given the next available GID such that there is no collisio
Additional Information
I've read glusterfs.go and glusterfs_minmax.go until I have turned blue. It's CIS101 level stuff. Upon first initialization of the provisioner, Iterate over the PV listing generated by the kube client and if that PV has the glusterfs-storage storageclass, grab the GID from annotations. Try to Allocate() that GID into the gidTable (which has protection around the critical section). If that GID isn't used, mark it as used and move on. If that GID is used, complain about it and move on.
THEN, during Provisioning, the provisioner simply asks to AllocateNext(). And it goes from min to max looking if that GID has been used. If not, it will return that number. If it's full to MAX, it returns error.
However check this out.... It makes little to no sense whatsoever:
More logs can be provided if needed:
# cat ALREADY_ALLOCATED-log | egrep "GID.*2006"
W1205 15:36:35.348688 1 glusterfs.go:519] GID 2006 found in pv pvc-098dfc99-86ce-11e8-9ed0-941882791a70 was already allocated
W1205 15:36:35.348705 1 glusterfs.go:519] GID 2006 found in pv pvc-0ed3f8d2-552a-11e8-b87e-941882791a70 was already allocated
W1205 15:36:35.348717 1 glusterfs.go:519] GID 2006 found in pv pvc-3169d162-6e89-11e8-b36b-941882791a70 was already allocated
W1205 15:36:35.348726 1 glusterfs.go:519] GID 2006 found in pv pvc-368058f5-dd63-11e8-889c-ee2e54e81f45 was already allocated
W1205 15:36:35.348737 1 glusterfs.go:519] GID 2006 found in pv pvc-37e6d2f8-b1e5-11e8-9ab1-ee2e54e81f45 was already allocated
W1205 15:36:35.348746 1 glusterfs.go:519] GID 2006 found in pv pvc-3970bbcc-94b6-11e8-8f47-941882791a70 was already allocated
W1205 15:36:35.348756 1 glusterfs.go:519] GID 2006 found in pv pvc-3d3b71ee-95b4-11e8-8f47-941882791a70 was already allocated
W1205 15:36:35.348765 1 glusterfs.go:519] GID 2006 found in pv pvc-3ddb2a0d-ab98-11e8-a713-94188278293c was already allocated
W1205 15:36:35.348774 1 glusterfs.go:519] GID 2006 found in pv pvc-45ebdcdf-d3e6-11e8-a44a-ee2e54e81f45 was already allocated
W1205 15:36:35.348781 1 glusterfs.go:519] GID 2006 found in pv pvc-51c2f451-702f-11e8-a3ac-94188278293c was already allocated
W1205 15:36:35.348790 1 glusterfs.go:519] GID 2006 found in pv pvc-55d14c19-c102-11e8-a850-ee2e54e81f45 was already allocated
W1205 15:36:35.348800 1 glusterfs.go:519] GID 2006 found in pv pvc-57b59d59-d95e-11e8-889c-ee2e54e81f45 was already allocated
W1205 15:36:35.348808 1 glusterfs.go:519] GID 2006 found in pv pvc-66e50a04-aa3f-11e8-9ab1-ee2e54e81f45 was already allocated
W1205 15:36:35.348816 1 glusterfs.go:519] GID 2006 found in pv pvc-75e436be-f8a0-11e8-bdc2-941882791a70 was already allocated
W1205 15:36:35.348826 1 glusterfs.go:519] GID 2006 found in pv pvc-797c5e84-f8a1-11e8-bdc2-941882791a70 was already allocated
W1205 15:36:35.348838 1 glusterfs.go:519] GID 2006 found in pv pvc-7b8c451f-5960-11e8-bd55-941882791a70 was already allocated
W1205 15:36:35.348848 1 glusterfs.go:519] GID 2006 found in pv pvc-873cc4de-d186-11e8-b1dc-94188278293c was already allocated
W1205 15:36:35.348858 1 glusterfs.go:519] GID 2006 found in pv pvc-8e8b2b25-e777-11e8-b581-941882791a70 was already allocated
W1205 15:36:35.348864 1 glusterfs.go:519] GID 2006 found in pv pvc-943e5eb3-954e-11e8-8f47-941882791a70 was already allocated
W1205 15:36:35.348871 1 glusterfs.go:519] GID 2006 found in pv pvc-9c8563ce-968b-11e8-86d5-941882782978 was already allocated
W1205 15:36:35.348878 1 glusterfs.go:519] GID 2006 found in pv pvc-a145340d-d62a-11e8-8de0-941882782978 was already allocated
W1205 15:36:35.348886 1 glusterfs.go:519] GID 2006 found in pv pvc-b15632c1-c010-11e8-bbe2-94188278293c was already allocated
W1205 15:36:35.348893 1 glusterfs.go:519] GID 2006 found in pv pvc-b1fb20ab-d6cf-11e8-a44a-ee2e54e81f45 was already allocated
W1205 15:36:35.348902 1 glusterfs.go:519] GID 2006 found in pv pvc-c223b709-d626-11e8-a44a-ee2e54e81f45 was already allocated
W1205 15:36:35.348912 1 glusterfs.go:519] GID 2006 found in pv pvc-c998bde7-f1c6-11e8-be17-941882791a70 was already allocated
W1205 15:36:35.348931 1 glusterfs.go:519] GID 2006 found in pv pvc-ce6609b4-e3a8-11e8-b581-941882791a70 was already allocated
W1205 15:36:35.348938 1 glusterfs.go:519] GID 2006 found in pv pvc-d441235b-5a9f-11e8-b396-94188278293c was already allocated
W1205 15:36:35.348945 1 glusterfs.go:519] GID 2006 found in pv pvc-d84a30aa-de14-11e8-8c96-941882791a70 was already allocated
W1205 15:36:35.348952 1 glusterfs.go:519] GID 2006 found in pv pvc-e5123cdb-e3ce-11e8-b581-941882791a70 was already allocated
W1205 15:36:35.348958 1 glusterfs.go:519] GID 2006 found in pv pvc-ea67c9c5-f270-11e8-be17-941882791a70 was already allocated
I1205 15:36:39.370132 1 glusterfs.go:703] Allocated GID 2006 for PVC pvc-broken
As you can see this has been going on for a minute. Actually the more that I look at this, the more that I see that we've not had a GID assigned that was not either 2006 or 2001 since mid may of 2018. I want to say this was 3.7.2 to 3.9? Or was it 3.7 to 3.7.2? Either way, this is only happening in one of our clusters. We have 2 prod, 3 lab... So it's very odd indeed.
I'm sure I'm just missing something? Ill keep cracking for a bit as I need this answered before we make some other decisions :(
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle rotten /remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.
/close
@openshift-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting
/reopen. Mark the issue as fresh by commenting/remove-lifecycle rotten. Exclude this issue from closing again by commenting/lifecycle frozen./close
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/test-infra repository.