Bug 2041441 - Provision volume with size 3000Gi even if sizeRange: '[10-2000]GiB' in storageclass on IBM cloud
Summary: Provision volume with size 3000Gi even if sizeRange: '[10-2000]GiB' in storag...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.10.0
Assignee: Jonathan Dobson
QA Contact: Chao Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-17 11:11 UTC by Chao Yang
Modified: 2022-03-10 16:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:40:08 UTC
Target Upstream Version:
Embargoed:
jdobson: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ibm-vpc-block-csi-driver-operator pull 20 0 None open Bug 2041441: Provision volume with size 3000Gi even if sizeRange: '[1… 2022-01-26 22:12:59 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:40:19 UTC

Description Chao Yang 2022-01-17 11:11:11 UTC
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:

Comment 1 Jonathan Dobson 2022-01-18 17:46:23 UTC
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?

Comment 2 Ambika Nair 2022-01-24 07:25:53 UTC
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.

Comment 6 Chao Yang 2022-01-29 02:53:10 UTC
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

Comment 9 errata-xmlrpc 2022-03-10 16:40:08 UTC
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


Note You need to log in before you can comment on or make changes to this bug.