problem
The updateStoragePool API currently accepts zero or negative values for capacity-related parameters. Add positive-number validation so invalid values are rejected with Invalid parameter error. This prevents invalid storage pool capacity settings from reaching backend processing.
versions
The versions of ACS, hypervisors, storage, network etc..
Checked on 4.23
The steps to reproduce the bug
- Click on edit option for storage pool
- Input a negative number for capacity bytes
3.click on OK to edit it.
you see an error as : Unable to update on DB, due to: Data truncation: Out of range value for column 'capacity_bytes' at row 1
instead of throwing an error for invalid parameter.
...
What to do about it?
Before this fix : When I tried to update a default primary storage pool using a negative value
when I tried to input 0 as capacity bytes for storage pool: It is updating it to 0
Add positive-number validation to the capacity bytes parameter in the updateStoragePool API. If a user provides zero or a negative value, reject the request immediately with a clear invalid-parameter error instead of sending it for backend processing.
After the fix:

problem
The updateStoragePool API currently accepts zero or negative values for capacity-related parameters. Add positive-number validation so invalid values are rejected with Invalid parameter error. This prevents invalid storage pool capacity settings from reaching backend processing.
versions
The versions of ACS, hypervisors, storage, network etc..
Checked on 4.23
The steps to reproduce the bug
3.click on OK to edit it.
you see an error as : Unable to update on DB, due to: Data truncation: Out of range value for column 'capacity_bytes' at row 1
instead of throwing an error for invalid parameter.
...
What to do about it?
Before this fix : When I tried to update a default primary storage pool using a negative value
when I tried to input 0 as capacity bytes for storage pool: It is updating it to 0
Add positive-number validation to the capacity bytes parameter in the updateStoragePool API. If a user provides zero or a negative value, reject the request immediately with a clear invalid-parameter error instead of sending it for backend processing.
After the fix: