anuragaw commented on a change in pull request #3320: server: fix for inactive
service offering for VM
URL: https://github.com/apache/cloudstack/pull/3320#discussion_r282748432
##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -965,6 +965,9 @@ public UserVm upgradeVirtualMachine(UpgradeVMCmd cmd)
throws ResourceAllocationE
// Check resource limits for CPU and Memory.
Map<String, String> customParameters = cmd.getDetails();
ServiceOfferingVO newServiceOffering = _offeringDao.findById(svcOffId);
+ if (newServiceOffering.getState() == DiskOffering.State.Inactive) {
+ throw new InvalidParameterValueException(String.format("Unable to
upgrade virtual machine %s with an inactive service offering %s",
vmInstance.toString(), newServiceOffering.getUuid()));
Review comment:
nit - vmInstance.name?
----------------------------------------------------------------
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]
With regards,
Apache Git Services