cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sw...@apache.org
Subject [1/3] git commit: updated refs/heads/master to 7be8585
Date Fri, 13 May 2016 21:02:38 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master c82d50270 -> 7be858578


CPU socket count reporting correction

CPU socket count reporting correction
>From https://github.com/MissionCriticalCloud/cosmic-plugin-hypervisor-kvm/pull/16

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

Branch: refs/heads/master
Commit: 42de1f81ed13145374a5838459ce068881966e8c
Parents: 419f8fb
Author: NuxRo <nux@li.nux.ro>
Authored: Wed Apr 27 10:49:53 2016 +0100
Committer: NuxRo <nux@li.nux.ro>
Committed: Wed Apr 27 10:49:53 2016 +0100

----------------------------------------------------------------------
 .../hypervisor/kvm/resource/LibvirtComputingResource.java   | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/42de1f81/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 883c8c9..a15071e 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -2625,8 +2625,15 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
             final Connect conn = LibvirtConnection.getConnection();
             final NodeInfo hosts = conn.nodeInfo();
             speed = getCpuSpeed(hosts);
-
+            
+            /*
+            * Some CPUs report a single socket and multiple NUMA cells.
+            * We need to multiply them to get the correct socket count.
+            */
             cpuSockets = hosts.sockets;
+            if (hosts.nodes > 0) {
+                cpuSockets = hosts.sockets * hosts.nodes;
+            }
             cpus = hosts.cpus;
             ram = hosts.memory * 1024L;
             final LibvirtCapXMLParser parser = new LibvirtCapXMLParser();


Mime
View raw message