Roy Golan has uploaded a new change for review. Change subject: core: Use the cluster emulated machine to run a VM ......................................................................
core: Use the cluster emulated machine to run a VM According to http://www.ovirt.org/Cluster_emulation_modes#Run%20VM Instead of a global config value, use the cluster emulated machine field. Deleted the deprecated emulatedMachine Config value Change-Id: If70b3769c72c7c4b3025661bd8fba16f24c6fbcf Signed-off-by: Roy Golan <[email protected]> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VirtMonitoringStrategy.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java M packaging/etc/engine-config/engine-config.properties 4 files changed, 6 insertions(+), 9 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/69/15869/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java index ac126f5..7878717 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java @@ -536,10 +536,6 @@ @TypeConverterAttribute(Boolean.class) @DefaultValueAttribute("true") SendSMPOnRunVm(215), - @Reloadable - @TypeConverterAttribute(String.class) - @DefaultValueAttribute("pc") - EmulatedMachine(216), @TypeConverterAttribute(String.class) @DefaultValueAttribute(" WHERE RowNum BETWEEN %1$s AND %2$s") @OptionBehaviourAttribute(behaviour = OptionBehaviour.ValueDependent, dependentOn = ConfigValues.DBEngine, diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VirtMonitoringStrategy.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VirtMonitoringStrategy.java index 09d7c3b..b2d546b 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VirtMonitoringStrategy.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VirtMonitoringStrategy.java @@ -1,7 +1,6 @@ package org.ovirt.engine.core.vdsbroker; import java.util.Arrays; -import java.util.List; import org.apache.commons.lang.StringUtils; import org.ovirt.engine.core.common.businessentities.NonOperationalReason; @@ -51,7 +50,7 @@ private boolean hostEmulationModeMatchesTheConfigValues(VDS vds, String[] hostSupportedEmulatedMachines) { // match this host against the config flags by order String matchedEmulatedMachine = ListUtils.firstMatch( - Config.<List<String>>GetValue(ConfigValues.ClusterEmulatedMachines), + Arrays.asList(Config.<String>GetValue(ConfigValues.ClusterEmulatedMachines).split(",")), hostSupportedEmulatedMachines); if (matchedEmulatedMachine != null && !matchedEmulatedMachine.isEmpty()) { 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 cc5a848..3b272e4 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 @@ -62,8 +62,10 @@ } final String compatibilityVersion = vm.getVdsGroupCompatibilityVersion().toString(); addCpuPinning(compatibilityVersion); - createInfo.put(VdsProperties.emulatedMachine, Config.<String> GetValue( - ConfigValues.EmulatedMachine, compatibilityVersion)); + createInfo.put(VdsProperties.emulatedMachine, DbFacade.getInstance() + .getVdsGroupDao() + .get(vm.getVdsGroupId()) + .getEmulatedMachine()); // send cipher suite and spice secure channels parameters only if ssl // enabled. if (Config.<Boolean> GetValue(ConfigValues.SSLEnabled)) { diff --git a/packaging/etc/engine-config/engine-config.properties b/packaging/etc/engine-config/engine-config.properties index 910f9f6..0845807 100644 --- a/packaging/etc/engine-config/engine-config.properties +++ b/packaging/etc/engine-config/engine-config.properties @@ -21,7 +21,7 @@ CpuOverCommitDurationMinutes.type=Integer DisableFenceAtStartupInSec.description="Disable Fence Operations At oVirt Startup In Seconds" DisableFenceAtStartupInSec.type=Integer -EmulatedMachine.description="Supported machine types" +ClusterEmulatedMachines.description="Supported machine types" WANDisableEffects.description="Disabled WAN Effects value to send to the SPICE console" WANDisableEffects.validValues=animation,wallpaper,font-smooth,all WANDisableEffects.type=StringMultiple -- To view, visit http://gerrit.ovirt.org/15869 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If70b3769c72c7c4b3025661bd8fba16f24c6fbcf 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
