bhouse-nexthop opened a new issue, #14749: URL: https://github.com/apache/cloudstack/issues/14749
### problem `changeOfferingForVolume` to the volume's current custom-size offering, with the same size, is not rejected. | step | value | |---|---| | `validateVolumeResizeWithNewDiskOfferingAndLoad` | converts the custom size from GiB to bytes | | `checkIfVolumeCanResizeWithNewDiskOffering` | compares `volume.getSize()` with `newSize << 30`, so bytes are shifted a second time | | result | the "Volume ... is already having disk offering ..." guard never matches for custom offerings; the request runs the full change path | ### versions 4.22 (the same code is on main). ### The steps to reproduce the bug 1. Create a data volume on a custom-size disk offering, 10 GiB. 2. `changeOfferingForVolume id=<vol> diskofferingid=<same offering> size=10`. 3. The call is accepted instead of being rejected as unchanged. ### What to do about it? Compare bytes with bytes. Only reject when min/max IOPS are also unchanged, so IOPS-only changes keep working, and leave compute-only offerings alone (their size is taken from the volume, and scale VM to the same custom service offering goes through this path). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
