You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2023/04/05 14:55:22 UTC
[cloudstack] 01/01: Merge branch '4.17' into 4.18
This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit a28b4398c590a34cc7b9208978e4328c985fcefe
Merge: 9e13042120 b2f1965ccb
Author: Daan Hoogland <da...@onecht.net>
AuthorDate: Wed Apr 5 16:54:35 2023 +0200
Merge branch '4.17' into 4.18
.../com/cloud/storage/VolumeApiServiceImpl.java | 75 ++++++++++------------
1 file changed, 33 insertions(+), 42 deletions(-)
diff --cc server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
index 8919e0f510,020cd5b26d..d259ad871d
--- a/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
@@@ -2079,11 -1982,10 +2039,16 @@@ public class VolumeApiServiceImpl exten
newHypervisorSnapshotReserve[0] = volume.getHypervisorSnapshotReserve() != null ? newDiskOffering.getHypervisorSnapshotReserve() : null;
}
+ setNewIopsLimits(volume, newDiskOffering, newMinIops, newMaxIops);
+
+ if (existingDiskOffering.getDiskSizeStrictness() && !(volume.getSize().equals(newSize[0]))) {
+ throw new InvalidParameterValueException(String.format("Resize volume for %s is not allowed since disk offering's size is fixed", volume.getName()));
+ }
++
+ Long instanceId = volume.getInstanceId();
+ VMInstanceVO vmInstanceVO = _vmInstanceDao.findById(instanceId);
+
+ checkIfVolumeCanResizeWithNewDiskOffering(volume, existingDiskOffering, newDiskOffering, newSize[0], vmInstanceVO);
checkIfVolumeIsRootAndVmIsRunning(newSize[0], volume, vmInstanceVO);
}