You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/06/09 22:07:08 UTC
[GitHub] [cloudstack] GabrielBrascher commented on a change in pull request #5095: Failed to scale from services with same root disk size
GabrielBrascher commented on a change in pull request #5095:
URL: https://github.com/apache/cloudstack/pull/5095#discussion_r648716671
##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1167,6 +1172,16 @@ public VolumeVO resizeVolume(ResizeVolumeCmd cmd) throws ResourceAllocationExcep
shrinkOk);
}
+ /**
+ * A volume should not be resized if it covers ALL the following scenarios: <br>
+ * 1 - Root volume <br>
+ * 2 - && Current Disk Offering enforces a root disk size (in this case one can resize only by changing the Service Offering) <br>
+ */
+ private boolean isNotPossibleToResize(VolumeVO volume, ImageFormat format, DiskOfferingVO diskOffering) {
+ ServiceOfferingJoinVO serviceOfferingView = serviceOfferingJoinDao.findById(diskOffering.getId());
+ return serviceOfferingView.getRootDiskSize() > 0 && volume.getVolumeType().equals(Volume.Type.ROOT);
Review comment:
@Pearl1594 I changed this if-conditional when compared to PR #4829.
I removed the ISO format comparison (`format != ImageFormat.ISO`) as the firs validation checks for `serviceOfferingView.getRootDiskSize()`. I could not see a situation of an ISO getting into this flow.
Please let me know if I am missing anything.
Thanks in advance!
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org