-
Notifications
You must be signed in to change notification settings - Fork 31
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
Volume size mismatch between pvc and gluster when a decimal point pvc is created #130
Comments
@PrasadDesala please provide the PVC describe and gluster volume size output. |
[vagrant@kube1 ~]$ kubectl describe pvc -n gcs Normal ExternalProvisioning 62s persistentvolume-controller waiting for a volume to be created, either by external provisioner "org.gluster.glusterfs" or manually created by system administrator [root@gluster-kube1-0 ~]# glustercli volume info Volume Name: pvc-90a55545-0e5f-11e9-af0b-525400f94cb8 |
@humblec @JohnStrunk is this expected behavior in the kube side, I see in CSI we are creating volume with size as bytes, |
During vol create, we pull the desired capacity (in bytes) straight from the incoming CSI request here:
And pass it unchanged to gd2 here:
It would be a good check if we had the output of the create request/response:
My thought is that we may be losing some capacity during brick creation (LVM & mkfs), leading to a volume that is smaller than expected. @aravindavk Is there a way to validate what's happening on the gd2 side? |
@JohnStrunk CSI received a request to create PVC of size |
Ah... I misread the original description... I thought the resulting volume was smaller than requested. Re-reading, it appears that the volume is created w/ the requested size, but when querying the PVC, it shows a capacity in excess of the requested amount. I looked through the kubernetes CSI code a bit and found this: It appears they take the bytes and if it's > 1 Gi, it gets rounded to a whole number. This function is used in the CreateVolume call when initializing the PV object based on the capacity returned from the provisioning request. Assuming I'm reading the code correctly, I'd consider this a bug in the kube CSI sidecar for not preserving the precision of the response. |
Describe the bug
I have created a 2.5G PVC. Gluster volume it created in backend is of capacity 2.5GiB but pvc capacity it is showing as 3Gi.
Steps to reproduce
Steps to reproduce the behavior:
Actual results
Volume size mismatch between pvc and gluster when a decimal point pvc is created.
Expected behavior
Volume size should be same in both get pvc and gluster backend.
The text was updated successfully, but these errors were encountered: