Updated Branches: refs/heads/4.2 c8ad4e5ce -> 6752641cc
CLOUDSTACK-3267 Improved logging by logging the memory values when exception is thrown for the constraint 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/6752641c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6752641c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6752641c Branch: refs/heads/4.2 Commit: 6752641ccd9d75b87102c67666a2f601789808cb Parents: c8ad4e5 Author: Nitin Mehta <[email protected]> Authored: Thu Jul 4 14:22:51 2013 +0530 Committer: Nitin Mehta <[email protected]> Committed: Thu Jul 4 14:27:42 2013 +0530 ---------------------------------------------------------------------- .../src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6752641c/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index 6f2e842..cc6f37a 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -650,7 +650,8 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe Long newDynamicMemoryMin = vmSpec.getMinRam(); Long newDynamicMemoryMax = vmSpec.getMaxRam(); if (staticMemoryMin > newDynamicMemoryMin || newDynamicMemoryMax > staticMemoryMax) { - throw new CloudRuntimeException("Cannot scale up the vm because of memory constraint violation: 0 <= memory-static-min <= memory-dynamic-min <= memory-dynamic-max <= memory-static-max "); + throw new CloudRuntimeException("Cannot scale up the vm because of memory constraint violation: " + + "0 <= memory-static-min(" +staticMemoryMin+ ") <= memory-dynamic-min(" +newDynamicMemoryMin+ ") <= memory-dynamic-max(" +newDynamicMemoryMax+ ") <= memory-static-max(" +staticMemoryMax+ ")"); } vm.setMemoryDynamicRange(conn, newDynamicMemoryMin, newDynamicMemoryMax);
