Updated Branches: refs/heads/master 968c252ca -> bb6cd764c
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/bb6cd764 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bb6cd764 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bb6cd764 Branch: refs/heads/master Commit: bb6cd764c75f5b781be7a502b77542565909879f Parents: 968c252 Author: Nitin Mehta <[email protected]> Authored: Thu Jul 4 14:22:51 2013 +0530 Committer: Nitin Mehta <[email protected]> Committed: Thu Jul 4 14:24:41 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/bb6cd764/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 e07df0b..c8e00da 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);
