Updated Branches: refs/heads/4.2 aae860a66 -> 25f15bd35
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/25f15bd3 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/25f15bd3 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/25f15bd3 Branch: refs/heads/4.2 Commit: 25f15bd3559607111e4b760d16be918a197d3959 Parents: aae860a Author: Nitin Mehta <[email protected]> Authored: Fri Aug 16 12:57:14 2013 +0530 Committer: Nitin Mehta <[email protected]> Committed: Fri Aug 16 12:57:14 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/25f15bd3/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 5943cb4..ca93ef7 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -1253,7 +1253,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use // 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
