Description of problem: Provision volume with size 3000Gi even if sizeRange: '[10-2000]GiB' in storageclass on IBM cloud Version-Release number of selected component (if applicable): 4.10.0-0.nightly-2022-01-16-191814 How reproducible: Always Steps to Reproduce: 1.Install OCP cluster on ibmcloud 2.Create pvc/pod oc get pvc myclaimresize -o json | jq .spec { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "3000Gi" } }, "storageClassName": "ibmc-vpc-block-10iops-tier", "volumeMode": "Filesystem", "volumeName": "pvc-68895397-4233-4884-a80c-d9268e966325" } 3.oc get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-68895397-4233-4884-a80c-d9268e966325 3000Gi RWO Delete Bound test3/myclaimresize ibmc-vpc-block-10iops-tier 16m 4. oc exec pod1 -- df -h | grep tmp1 /dev/vdf 2.9T 89M 2.9T 1% /tmp1 5.oc get sc/ibmc-vpc-block-10iops-tier -o yaml allowVolumeExpansion: true apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: annotations: storageclass.kubernetes.io/is-default-class: "true" creationTimestamp: "2022-01-17T03:15:40Z" labels: addonmanager.kubernetes.io/mode: Reconcile app: ibm-vpc-block-csi-driver razee/force-apply: "true" name: ibmc-vpc-block-10iops-tier resourceVersion: "5975" uid: 7f8f7985-8af1-487a-aab3-756592dea22c parameters: billingType: hourly classVersion: "1" csi.storage.k8s.io/fstype: ext4 encrypted: "false" encryptionKey: "" profile: 10iops-tier region: "" resourceGroup: "" sizeRange: '[10-2000]GiB' tags: "" zone: "" provisioner: vpc.block.csi.ibm.io reclaimPolicy: Delete volumeBindingMode: WaitForFirstConsumer Actual results: value 2000GiB in sizeRange does not work. Expected results: Could not provision volume size greater than 2000GiB. Master Log: Node Log (of failed PODs): PV Dump: PVC Dump: StorageClass Dump (if StorageClass used by PV/PVC): Additional info:
Apparently this is stubbed out in the driver with just a log message: https://github.com/openshift/ibm-vpc-block-csi-driver/blob/d54e3706bb8b38447800aa91632a946eb6c990ec/pkg/ibmcsidriver/controller_helper.go#L174-L176 case SizeRangeSupported: // Ignore... Provided in SC just as user information logger.Info("Ignoring storage class parameter", zap.Any("ClassParameter", SizeRangeSupported)) @arahamad.com is there any plan to change this, so the driver validates the size of the volume being requested? If not, would it make sense to remove sizeRange from the storageclasses until that change is made?
Hi @jdobson The IOPS tier and Volume size is per the doc : https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles&interface=ui#tiers-beta. Looks like the doc got updated and our SCs are still referring to old values. To keep things simple, we will remove the sizeRange from SC as you suggested.
parameters: csi.storage.k8s.io/fstype: ext4 encrypted: "false" encryptionKey: "" profile: 10iops-tier region: "" resourceGroup: "" tags: "" zone: "" Passed with 4.10.0-0.nightly-2022-01-27-221656
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:0056