Bug 1907875 - No response when try to expand pvc with an invalid size
Summary: No response when try to expand pvc with an invalid size
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.7.0
Assignee: Jakub Hadvig
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-15 12:28 UTC by Yanping Zhang
Modified: 2021-02-24 15:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: When patching PCV, console is not catching errors. Consequence: No error info about the invalid value is shown when expanding PVC with negative number Fix: Put patching of the PVC into a catch block, to catch an error. Result: Error info about the invalid value is shown when expanding PVC with negative number
Clone Of:
Environment:
Last Closed: 2021-02-24 15:44:28 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 7559 0 None closed Bug 1907875: Expand pvc should respond with an invalid size 2021-01-15 16:57:35 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:44:56 UTC

Description Yanping Zhang 2020-12-15 12:28:19 UTC
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:

Comment 3 Yanping Zhang 2020-12-21 07:09:24 UTC
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.

Comment 5 errata-xmlrpc 2021-02-24 15:44:28 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.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


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