sureshanaparti commented on a change in pull request #5008:
URL: https://github.com/apache/cloudstack/pull/5008#discussion_r754994744
##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -2086,6 +2006,38 @@ private boolean upgradeRunningVirtualMachine(Long vmId,
Long newServiceOfferingI
return success;
}
+ private void changeDiskOfferingForRootVolume(Long vmId, DiskOfferingVO
newDiskOffering, Map<String, String> customParameters) throws
ResourceAllocationException {
+
+ List<VolumeVO> vols =
_volsDao.findReadyAndAllocatedRootVolumesByInstance(vmId);
+
+ for (final VolumeVO rootVolumeOfVm : vols) {
+ DiskOfferingVO currentRootDiskOffering =
_diskOfferingDao.findById(rootVolumeOfVm.getDiskOfferingId());
+ HypervisorType hypervisorType =
_volsDao.getHypervisorType(rootVolumeOfVm.getId());
+ if (HypervisorType.Simulator != hypervisorType) {
+ Long minIopsInNewDiskOffering = null;
+ Long maxIopsInNewDiskOffering = null;
+ boolean autoMigrate = false;
+ if (customParameters.containsKey(ApiConstants.MIN_IOPS)) {
Review comment:
what if the new disk offering has min/max iops, and not specified
through custom parameters?
--
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]