Roy Golan has uploaded a new change for review.

Change subject: core: Hot plug CPU - send max number of cpu
......................................................................

core: Hot plug CPU - send max number of cpu

from Version > 3.3 send the max # of cpu for a VM with the create
details.

in VDSM, this info is needed to create a topology of cpu with that max
number, to have room for adding CPUs later

VDSM and libvirt xml is changing to reflect this change [1]

[1] http://gerrit.ovirt.org/#/c/21789/

Change-Id: Ibc24a793caecf5ac9f8f38968dd76cba9212074b
wiki: http://www.ovirt.org/Hot_plug_cpu
Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=1036492
Signed-off-by: Roy Golan <[email protected]>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java
2 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/49/22749/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java
index 83ed398..60aeaf0 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java
@@ -176,6 +176,7 @@
     public static final String num_of_monitors = "spiceMonitors";
     public static final String num_of_cpus = "smp";
     public static final String cores_per_socket = "smpCoresPerSocket";
+    public static final String max_number_of_cpus = "maxVCpu";
     public static final String cpuPinning = "cpuPinning";
     public static final String vm_name = "vmName";
     public static final String vm_guid = "vmId";
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java
index 70dec10..a8aaeba 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java
@@ -27,6 +27,7 @@
 import org.ovirt.engine.core.common.osinfo.OsRepository;
 import org.ovirt.engine.core.common.utils.SimpleDependecyInjector;
 import org.ovirt.engine.core.compat.Guid;
+import org.ovirt.engine.core.compat.Version;
 import org.ovirt.engine.core.compat.WindowsJavaTimezoneMapping;
 import org.ovirt.engine.core.dal.dbbroker.DbFacade;
 import org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector;
@@ -70,6 +71,9 @@
         if (Config.<Boolean> getValue(ConfigValues.SendSMPOnRunVm)) {
             createInfo.put(VdsProperties.cores_per_socket,
                     (Integer.toString(vm.getCpuPerSocket())));
+            if (vm.getVdsGroupCompatibilityVersion().compareTo(Version.v3_3) 
== 1) { // TODO change this when Version 3.4 is added
+                createInfo.put(VdsProperties.max_number_of_cpus, 
Config.<String> getValue(ConfigValues.MaxNumOfVmCpus));
+            }
         }
         final String compatibilityVersion = 
vm.getVdsGroupCompatibilityVersion().toString();
         addCpuPinning(compatibilityVersion);


-- 
To view, visit http://gerrit.ovirt.org/22749
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc24a793caecf5ac9f8f38968dd76cba9212074b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to