GabrielBrascher commented on a change in pull request #4341:
URL: https://github.com/apache/cloudstack/pull/4341#discussion_r511060732



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1139,6 +1143,13 @@ public VolumeVO resizeVolume(ResizeVolumeCmd cmd) throws 
ResourceAllocationExcep
                 shrinkOk);
     }
 
+    private void checkIfVolumeIsRootAndVmIsRunning(Long newSize, VolumeVO 
volume, VMInstanceVO vmInstanceVO) {
+        if (!volume.getSize().equals(newSize) && 
volume.getVolumeType().equals(Volume.Type.ROOT) && 
!State.Stopped.equals(vmInstanceVO.getState())) {

Review comment:
       @ravening good question.
   
   This was done to avoid users thinking that the service offering was updated 
correctly. Unfortunatelly, it is necessary to Stop/Start the VM, otherwise IOps 
updates would not take effect, for example. Considering that this is a service 
offering update command, then we need to take such situations into account.
   
   Additionally, not all operation systems support dynamic memory scaling.




----------------------------------------------------------------
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:
[email protected]


Reply via email to