Pearl1594 commented on a change in pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#discussion_r809914393
##########
File path:
engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
##########
@@ -92,7 +92,7 @@ public VolumeInfo getVolume() {
AsyncCallFuture<VolumeApiResult> resize(VolumeInfo volume);
- void resizeVolumeOnHypervisor(long volumeId, long newSize, long
destHostId, String instanceName);
+ void resizeVolumeOnHypervisor(long volumeId, long currentSize, long
newSize, long destHostId, String instanceName);
Review comment:
So currently,
https://github.com/apache/cloudstack/blob/9eefc76fc5ef9abf3d74a5cc6c528ca404c707fd/engine/storage/volume/src/main/java/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java#L2429
- uses volume.getSize() as the current Size and newSize is what ever size we
want the volume to get resized to. In case of resizing an attached volume,
volume.getSize() would be the size to which volume would be resized to. And if
I weren't to explicitly pass the actual size of the volume (as it was when on
the secondary store) currentSize would be equal to newSize and hence resizing
wouldn't happen. Because, with this PR I update the size of the uploaded volume
to the size that the disk offering enforces
https://github.com/apache/cloudstack/pull/6005/files#diff-b93da5c5293f8cb4470ff6b1642d312131bb053df07b71b4b951b08dff0ad9abR404-R405
--
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]