Description of problem: When expand pvc with an invalid size, clicking "Expand" gets no response. Version-Release number of selected component (if applicable): 4.6.0-0.nightly-2020-12-14-142858 How reproducible: Always Steps to Reproduce: 1.Create a StorageClass 'expand-sc' with AllowVolumeExpansion set to true (if default SC doesn't support `allowVolumeExpansion`) kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: expand-sc provisioner: kubernetes.io/aws-ebs parameters: fstype: xfs reclaimPolicy: Delete allowVolumeExpansion: true volumeBindingMode: Immediate 2.Create a PVC using 'expand-sc' 3.When PVC becomes Bound, go to Storage -> Persistent Volume Claims -> choose the PVC -> Actions -> Expand PVC And set the new value to a smaller value or a negative number, eg -1, click "Expand" Actual results: 3. There is no response after clicking. Expected results: 3. Should show error info about the invalid value. Additional info:
Checked on ocp 4.7 cluster with payload 4.7.0-0.nightly-2020-12-20-031835 When set the new value to a smaller value or a negative number on expand pvc modal, eg -1, click "Expand", there are alerts shown: Danger alert:An error occurred Error "Forbidden: field can not be less than previous value" for field "spec.resources.requests.storage". Danger alert:An error occurred Error "Invalid value: "-1Gi": must be greater than zero" for field "spec.resources[storage]". The bug is fixed.
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.7.0 security, bug fix, and enhancement 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-2020:5633