Updated Branches: refs/heads/master baf859166 -> 088ce975c
CLOUDSTACK-4313 Wrong error message is throwing on failure of dynamic scale up operation. Fix it. Signed off by : nitin mehta<[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/088ce975 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/088ce975 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/088ce975 Branch: refs/heads/master Commit: 088ce975c681a0885cf0a79da8fc19452555c18a Parents: baf8591 Author: Nitin Mehta <[email protected]> Authored: Fri Aug 16 12:57:14 2013 +0530 Committer: Nitin Mehta <[email protected]> Committed: Fri Aug 16 13:03:42 2013 +0530 ---------------------------------------------------------------------- server/src/com/cloud/vm/UserVmManagerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/088ce975/server/src/com/cloud/vm/UserVmManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 9ad4257..dc33d76 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -1248,7 +1248,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir // Don't allow to scale when (Any of the new values less than current values) OR (All current and new values are same) if( (newSpeed < currentSpeed || newMemory < currentMemory || newCpu < currentCpu) || ( newSpeed == currentSpeed && newMemory == currentMemory && newCpu == currentCpu)){ - throw new InvalidParameterValueException("Only scaling up the vm is supported, new service offering should have both cpu and memory greater than the old values"); + throw new InvalidParameterValueException("Only scaling up the vm is supported, new service offering(speed="+ newSpeed + ",cpu=" + newCpu + ",memory=," + newMemory + ")" + + " should have at least one value(cpu/ram) greater than old value and no resource value less than older(speed="+ currentSpeed + ",cpu=" + currentCpu + ",memory=," + currentMemory + ")"); } // Check resource limits
