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

calculate iops on disk create #241

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RomanenkoDenys
Copy link

@RomanenkoDenys RomanenkoDenys commented Nov 28, 2023

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

  • 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

Signed-off-by: Denis Romanenko <[email protected]>
@vmwclabot
Copy link
Member

@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
Copy link
Member

@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
Copy link
Member

@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
Copy link
Member

@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
Copy link
Member

@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
Copy link
Member

@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
Copy link
Member

@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.

@arunmk
Copy link
Collaborator

arunmk commented Dec 6, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants