cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject git commit: updated refs/heads/master to 71323f1
Date Wed, 04 Dec 2013 22:59:32 GMT
Updated Branches:
  refs/heads/master 15c300594 -> 71323f15c


CLOUDSTACK-5352:
CPU cap calculated incorrectly for VMs on XenServer hosts. It should not be limited by the
overprovisioning and should set the cap as service offering


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/71323f15
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/71323f15
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/71323f15

Branch: refs/heads/master
Commit: 71323f15c66a71fa2276987dda690761149f6fc9
Parents: 15c3005
Author: Nitin Mehta <nitin.mehta@citrix.com>
Authored: Wed Dec 4 14:59:24 2013 -0800
Committer: Nitin Mehta <nitin.mehta@citrix.com>
Committed: Wed Dec 4 14:59:24 2013 -0800

----------------------------------------------------------------------
 .../src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/71323f15/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 5d17290..ec62c25 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
@@ -689,7 +689,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
 
             if (vmSpec.getLimitCpuUse()) {
                 long utilization = 0; // max CPU cap, default is unlimited
-                utilization = (int)((speed * 0.99 * vmSpec.getCpus()) / _host.speed * 100);
+                utilization = (int) ((vmSpec.getMaxSpeed() * 0.99 * vmSpec.getCpus()) / _host.speed
* 100);
                 //vm.addToVCPUsParamsLive(conn, "cap", Long.toString(utilization)); currently
xenserver doesnot support Xapi to add VCPUs params live.
                 callHostPlugin(conn, "vmops", "add_to_VCPUs_params_live", "key", "cap", "value",
Long.toString(utilization), "vmname", vmSpec.getName());
             }


Mime
View raw message