bhouse-nexthop commented on code in PR #14647:
URL: https://github.com/apache/cloudstack/pull/14647#discussion_r4700640687
##########
server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java:
##########
@@ -1481,6 +1481,22 @@ public VolumeVO resizeVolume(ResizeVolumeCmd cmd) throws
ResourceAllocationExcep
}
}
+ /**
+ * The resize orchestration (orchestrateResizeVolume) only tells the
hypervisor about a running user VM. For a
+ * system VM the volume is resized on the storage, but the running guest
is not told and keeps seeing the old size
+ * until it next starts. So a system VM's volume can only be resized while
the system VM is stopped.
+ */
+ protected void validateSystemVmIsStoppedForResize(VolumeVO volume) {
+ if (volume.getInstanceId() == null) {
Review Comment:
Done in 25ad3f9d9c. The lookup now sits inside `if (volume.getInstanceId()
!= null)`, the same shape as `validateNoVmSnapshots`. It still works the same
way, and the tests are unchanged and pass.
--
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]