cloud-director-named-disk-csi-driver icon indicating copy to clipboard operation
cloud-director-named-disk-csi-driver copied to clipboard

calculate iops on disk create

Open RomanenkoDenys opened this issue 1 year ago • 8 comments

Description

Please provide a brief description of the changes proposed in this Pull Request When storage policy in vcloud director contains iops limits like that - image

PV creating fails with error:

I1127 19:42:57.201735       1 defined_entity.go:224] ClusterID [NO_RDE_6c07e13b-d224-4049-8f84-3a26fcd98b83] is empty or generated, hence cannot add errors [{DiskCreateError 2023-11-27 19:42:57.201730144 +0000 UTC m=+1925.848630679  pvc-2c6546ef-b4b9-4d7e-826b-ab24cca5fc6d map[Detailed Error:unable to create disk with name [pvc-2c6546ef-b4b9-4d7e-826b-ab24cca5fc6d] size [1024]MB: [unable to post create link [https://msk1-pub1.datafort.ru/api/vdc/6467fc48-2d3d-4da8-becc-e1697500c7ca/disk]: resp: [<nil>]: [error creating Disk with params: [&types.Error{Message:"[ 0c0367c3-db46-4093-b166-030f253ac6fa ] Requested disk iops 0 for disk \"pvc-2c6546ef-b4b9-4d7e-826b-ab24cca5fc6d\" exceeds maximum allowed iops 0.", MajorErrorCode:400, MinorErrorCode:"VM_LIMITS_SOFT_VIOLATION", VendorSpecificErrorCode:"", StackTrace:""}]]]]}] to RDE
E1127 19:42:57.201760       1 driver.go:190] GRPC error: function [/csi.v1.Controller/CreateVolume] req [&csi.CreateVolumeRequest{Name:"pvc-2c6546ef-b4b9-4d7e-826b-ab24cca5fc6d", CapacityRange:(*csi.CapacityRange)(0xc00018d080), VolumeCapabilities:[]*csi.VolumeCapability{(*csi.VolumeCapability)(0xc00032cd80)}, Parameters:map[string]string{"storageProfile":"SSD-dc1-pub1-cl1"}, Secrets:map[string]string(nil), VolumeContentSource:(*csi.VolumeContentSource)(nil), AccessibilityRequirements:(*csi.TopologyRequirement)(nil), XXX_NoUnkeyedLiteral:struct {}{}, XXX_unrecognized:[]uint8(nil), XXX_sizecache:0}]: [unable to create disk [pvc-2c6546ef-b4b9-4d7e-826b-ab24cca5fc6d] with sise [1024]MB: [unable to create disk with name [pvc-2c6546ef-b4b9-4d7e-826b-ab24cca5fc6d] size [1024]MB: [unable to post create link [https://msk1-pub1.datafort.ru/api/vdc/6467fc48-2d3d-4da8-becc-e1697500c7ca/disk]: resp: [<nil>]: [error creating Disk with params: [&types.Error{Message:"[ 0c0367c3-db46-4093-b166-030f253ac6fa ] Requested disk iops 0 for disk \"pvc-2c6546ef-b4b9-4d7e-826b-ab24cca5fc6d\" exceeds maximum allowed iops 0.", MajorErrorCode:400, MinorErrorCode:"VM_LIMITS_SOFT_VIOLATION", VendorSpecificErrorCode:"", StackTrace:""}]]]]]

This PR adds calculation of iops on disk create in the case of storage policy iops is defined.

Checklist

  • [x] tested locally
  • [ ] updated any relevant dependencies
  • [ ] updated any relevant documentation or examples

Testing Done

Please provide a screenshot of the testing results for the code change in this Pull Request. Verify that this pull request's code change will not affect CSI's normal operation

root@cloud-master-0:~# kubectl get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM            STORAGECLASS   REASON   AGE
pvc-2c6546ef-b4b9-4d7e-826b-ab24cca5fc6d   1Gi        RWO            Delete           Bound    default/my-pvc   vcd-disk-dev            10h

Issue

If applicable, please reference the relevant issue

Fixes #


This change is Reviewable

RomanenkoDenys avatar Nov 28 '23 06:11 RomanenkoDenys

@RomanenkoDenys, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

vmwclabot avatar Nov 28 '23 06:11 vmwclabot

@RomanenkoDenys, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

vmwclabot avatar Nov 28 '23 06:11 vmwclabot

@RomanenkoDenys, VMware has rejected your signed contributor license agreement. The merge can not proceed until the agreement has been resigned. Click here to resign the agreement. Reject reason:

VMware is not able to accept your contribution at this time

vmwclabot avatar Nov 28 '23 15:11 vmwclabot

@RomanenkoDenys, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

vmwclabot avatar Dec 04 '23 09:12 vmwclabot

@RomanenkoDenys, VMware has rejected your signed contributor license agreement. The merge can not proceed until the agreement has been resigned. Click here to resign the agreement. Reject reason:

VMware is not able to accept your contribution at this time.

vmwclabot avatar Dec 04 '23 10:12 vmwclabot

@RomanenkoDenys, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

vmwclabot avatar Dec 04 '23 10:12 vmwclabot

@RomanenkoDenys, VMware has rejected your signed contributor license agreement. The merge can not proceed until the agreement has been resigned. Click here to resign the agreement. Reject reason:

VMware is not able to accept your contribution at this time.

vmwclabot avatar Dec 06 '23 09:12 vmwclabot

hi @RomanenkoDenys , there seems to be some issue with the automated CLA acceptance. We will work on this and get it fixed. Sincere apologies for this. After the merger, we have had a set of infrastructure and documentation changes.

Until then, let us continue with the rest of the process.

arunmk avatar Dec 06 '23 22:12 arunmk