Bug 2231342

Summary: Ceph dashboard allows to set invalid value for quota value for max bytes which leads to wrongful setting of quota
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: ngangadh
Component: Ceph-DashboardAssignee: Nizamudeen <nia>
Status: CLOSED ERRATA QA Contact: ngangadh
Severity: high Docs Contact: Rivka Pollack <rpollack>
Priority: unspecified    
Version: 7.0CC: akraj, ceph-eng-bugs, cephqe-warriors, kdreyer, nia, tserlin, vereddy
Target Milestone: ---   
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-18.2.0-22.el9cp Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-12-13 15:21:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2237662    

Description ngangadh 2023-08-11 09:54:31 UTC
Description of problem: Ceph dashboard allows to set invalid value for quota value for max bytes which leads to wrongful setting of quota  


Version-Release number of selected component (if applicable): 7.0 


How reproducible: 5/5


Steps to Reproduce:
1. Create a cephfs mount either userspace or kernel. 
2. Create a directory inside the mount.
3. From UI dashboard, try setting the max_bytes quota.
4. If for any reason, user enters a symbol between the numbers like typo. Eg: User wants to set 10000, however ends up typing 100_00 then the notification says quota set successfully. 
5. Verify from UI and CLI, the set quota would be only 100 and not 10000 which would be wrongful setting of quota and notification. 

Actual results: Quota is allowed to set with invalid characters 


Expected results: Quota value should be validated in UI when entered by user and should not allow such values to be set. 
A proper error message saying 'Please enter a valid quota' needs to be displayed. 


Additional info:

Comment 6 errata-xmlrpc 2023-12-13 15:21:53 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 (Red Hat Ceph Storage 7.0 Bug Fix 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/RHBA-2023:7780