Gilad Chaplik has uploaded a new change for review.

Change subject: engine: scheduling: allow placement overbooking in cluster level
......................................................................

engine: scheduling: allow placement overbooking in cluster level

Adding a cluster optimization to enable parallel VM scheduling
requests for cluster (skip lock), in case pending requests are
greater than configurable threshold.
By default this feature is hidden from the user (unless
setting config.SchedulerAllowOverBooking to true).

Bug-Url: https://bugzilla.redhat.com/1014697
Change-Id: If52abf9974ab71b1f8d52ca268dac8dc39b89dc8
Reviewed-on: http://gerrit.ovirt.org/#/c/19271/
Signed-off-by: Gilad Chaplik <[email protected]>
---
M backend/manager/modules/bll/exclude-filters.xml
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/OptimizationType.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIMessages.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml
M packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
M packaging/etc/engine-config/engine-config.properties
14 files changed, 187 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/74/22174/1

diff --git a/backend/manager/modules/bll/exclude-filters.xml 
b/backend/manager/modules/bll/exclude-filters.xml
index 0d9ae09..6a0e130 100644
--- a/backend/manager/modules/bll/exclude-filters.xml
+++ b/backend/manager/modules/bll/exclude-filters.xml
@@ -98,4 +98,16 @@
        <Method name="clone"/>
        <Bug code="CN"/>
      </Match>
+
+     <!--
+        findbugs complains about synchronizing java.util.concurrent object - 
semaphore
+        we must synchronize 2 calls to the semaphore object (drain and release)
+        findbugs reason:
+        JLM_JSR166_UTILCONCURRENT_MONITORENTER:
+        This method performs synchronization an object that is an instance of 
a class from the java.util.concurrent
+     -->
+     <Match>
+       <Class name="org.ovirt.engine.core.bll.scheduling.SchedulingManager" />
+       <Bug pattern="JLM_JSR166_UTILCONCURRENT_MONITORENTER" />
+     </Match>
 </FindBugsFilter>
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
index f565a4d..c194472 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
@@ -229,6 +229,8 @@
             String correlationId) {
         clusterLockMap.putIfAbsent(cluster.getId(), new Semaphore(1));
         try {
+            log.debugFormat("scheduling started, correlation Id: {0}", 
correlationId);
+            checkAllowOverbooking(cluster);
             clusterLockMap.get(cluster.getId()).acquire();
             List<VDS> vdsList = getVdsDAO()
                     .getAllForVdsGroupWithStatus(cluster.getId(), 
VDSStatus.Up);
@@ -236,7 +238,6 @@
             updateInitialHostList(vdsList, hostWhiteList, false);
             ClusterPolicy policy = policyMap.get(cluster.getClusterPolicyId());
             Map<String, String> parameters = 
createClusterPolicyParameters(cluster);
-
             vdsList =
                     runFilters(policy.getFilters(),
                             vdsList,
@@ -284,7 +285,34 @@
             log.error("interrupted", e);
             return null;
         } finally {
-            clusterLockMap.get(cluster.getId()).release();
+            // ensuring setting the semaphore permits to 1
+            synchronized (clusterLockMap.get(cluster.getId())) {
+                clusterLockMap.get(cluster.getId()).drainPermits();
+                clusterLockMap.get(cluster.getId()).release();
+            }
+            log.debugFormat("Scheduling ended, correlation Id: {0}", 
correlationId);
+        }
+    }
+
+    /**
+     * Checks whether scheduler should schedule several requests in parallel:
+     * Conditions:
+     * * config option SchedulerAllowOverBooking should be enabled.
+     * * cluster optimization type flag should allow over-booking.
+     * * more than than X (config.SchedulerOverBookingThreshold) pending for 
scheduling.
+     * In case all of the above conditions are met, we release all the pending 
scheduling
+     * requests.
+     */
+    protected void checkAllowOverbooking(VDSGroup cluster) {
+        if (OptimizationType.ALLOW_OVERBOOKING == cluster.getOptimizationType()
+                && Config.<Boolean> 
GetValue(ConfigValues.SchedulerAllowOverBooking)
+                && clusterLockMap.get(cluster.getId()).getQueueLength() >=
+                Config.<Integer> 
GetValue(ConfigValues.SchedulerOverBookingThreshold)) {
+            log.infoFormat("scheduler: cluster ({0}) lock is skipped (cluster 
is allowed to overbook)",
+                    cluster.getName());
+            // release pending threads (requests) and current one (+1)
+            clusterLockMap.get(cluster.getId())
+                    .release(Config.<Integer> 
GetValue(ConfigValues.SchedulerOverBookingThreshold) + 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 fab5b29..081aff9 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
@@ -1541,6 +1541,14 @@
     @DefaultValueAttribute("10")
     SpeedOptimizationSchedulingThreshold(545),
 
+    @TypeConverterAttribute(Boolean.class)
+    @DefaultValueAttribute("false")
+    SchedulerAllowOverBooking(546),
+
+    @TypeConverterAttribute(Integer.class)
+    @DefaultValueAttribute("10")
+    SchedulerOverBookingThreshold(547),
+
     Invalid(65535);
 
     private int intValue;
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java
index 5ebebb7..18ff00d 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java
@@ -108,8 +108,9 @@
     AttestationServer,
     DefaultGeneralTimeZone,
     DefaultWindowsTimeZone,
-    SpeedOptimizationSchedulingThreshold
-    ;
+    SpeedOptimizationSchedulingThreshold,
+    SchedulerAllowOverBooking,
+    SchedulerOverBookingThreshold;
 
     public static enum ConfigAuthType {
         Admin,
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/OptimizationType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/OptimizationType.java
index b90cdc8..2dd5d3d 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/OptimizationType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/OptimizationType.java
@@ -6,10 +6,12 @@
  * <p>
  * none - 0
  * optimize_for_speed - 1
+ * allow_overbooking - 2
  */
 public enum OptimizationType {
     NONE(0),
-    OPTIMIZE_FOR_SPEED(1);
+    OPTIMIZE_FOR_SPEED(1),
+    ALLOW_OVERBOOKING(2);
 
     private final int value;
 
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
index 0768ff1..55d9cea 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
@@ -3327,4 +3327,14 @@
         return (Integer) 
getConfigValuePreConverted(ConfigurationValues.SpeedOptimizationSchedulingThreshold,
                 getDefaultConfigurationVersion());
     }
+
+    public static boolean getScheudulingAllowOverbookingSupported() {
+        return (Boolean) 
getConfigValuePreConverted(ConfigurationValues.SchedulerAllowOverBooking,
+                getDefaultConfigurationVersion());
+    }
+
+    public static int getSchedulerAllowOverbookingPendingRequestsThreshold() {
+        return (Integer) 
getConfigValuePreConverted(ConfigurationValues.SchedulerOverBookingThreshold,
+                getDefaultConfigurationVersion());
+    }
 }
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java
index cb9c817..2d78465 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java
@@ -372,6 +372,8 @@
 
         clusterModel.getOptimizeForSpeed()
                 .setEntity(OptimizationType.OPTIMIZE_FOR_SPEED == 
cluster.getOptimizationType());
+        clusterModel.getAllowOverbooking()
+                .setEntity(OptimizationType.ALLOW_OVERBOOKING == 
cluster.getOptimizationType());
 
         AsyncDataProvider.getAllowClusterWithVirtGlusterEnabled(new 
AsyncQuery(this, new INewAsyncCallback() {
             @Override
@@ -700,8 +702,13 @@
         cluster.setTrustedService((Boolean) 
model.getEnableTrustedService().getEntity());
         cluster.setClusterPolicyId(((ClusterPolicy) 
model.getClusterPolicy().getSelectedItem()).getId());
         
cluster.setClusterPolicyProperties(KeyValueModel.convertProperties(model.getCustomPropertySheet().getEntity()));
-        cluster.setOptimizationType((Boolean) 
model.getOptimizeForSpeed().getEntity() ?
-                OptimizationType.OPTIMIZE_FOR_SPEED : OptimizationType.NONE);
+        if ((Boolean) model.getOptimizeForSpeed().getEntity()) {
+            cluster.setOptimizationType(OptimizationType.OPTIMIZE_FOR_SPEED);
+        } else if ((Boolean) model.getAllowOverbooking().getEntity()) {
+            cluster.setOptimizationType(OptimizationType.ALLOW_OVERBOOKING);
+        } else {
+            cluster.setOptimizationType(OptimizationType.NONE);
+        }
 
         model.startProgress(null);
 
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
index 4e2d6e2..8f007c2 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
@@ -507,6 +507,25 @@
     public void setOptimizeForSpeed(EntityModel optimizeForSpeed) {
         this.optimizeForSpeed = optimizeForSpeed;
     }
+    private EntityModel guarantyResources;
+
+    public EntityModel getGuarantyResources() {
+        return guarantyResources;
+    }
+
+    public void setGuarantyResources(EntityModel guarantyResources) {
+        this.guarantyResources = guarantyResources;
+    }
+
+    private EntityModel allowOverbooking;
+
+    public EntityModel getAllowOverbooking() {
+        return allowOverbooking;
+    }
+
+    public void setAllowOverbooking(EntityModel allowOverbooking) {
+        this.allowOverbooking = allowOverbooking;
+    }
 
     private boolean isGeneralTabValid;
 
@@ -639,6 +658,12 @@
         return ConstantsManager.getInstance()
                 .getMessages()
                 
.schedulerOptimizationInfo(AsyncDataProvider.getOptimizeSchedulerForSpeedPendingRequests());
+    }
+
+    public String getAllowOverbookingInfoMessage() {
+        return ConstantsManager.getInstance()
+                .getMessages()
+                
.schedulerAllowOverbookingInfo(AsyncDataProvider.getSchedulerAllowOverbookingPendingRequestsThreshold());
     }
 
     public void setMemoryOverCommit(int value)
@@ -835,6 +860,38 @@
         getOptimizeForSpeed().setEntity(false);
         getOptimizeForUtilization().getEntityChangedEvent().addListener(this);
         getOptimizeForSpeed().getEntityChangedEvent().addListener(this);
+
+        setGuarantyResources(new EntityModel());
+        setAllowOverbooking(new EntityModel());
+        getGuarantyResources().setEntity(true);
+        getAllowOverbooking().setEntity(false);
+        getAllowOverbooking().getEntityChangedEvent().addListener(this);
+        getGuarantyResources().getEntityChangedEvent().addListener(this);
+
+        boolean overbookingSupported = 
AsyncDataProvider.getScheudulingAllowOverbookingSupported();
+        getAllowOverbooking().setIsAvailable(overbookingSupported);
+        if (overbookingSupported) {
+            getOptimizeForSpeed().getEntityChangedEvent().addListener(new 
IEventListener() {
+                @Override
+                public void eventRaised(Event ev, Object sender, EventArgs 
args) {
+                    Boolean entity = (Boolean) 
getOptimizeForSpeed().getEntity();
+                    if (entity) {
+                        getGuarantyResources().setEntity(true);
+                    }
+                    getAllowOverbooking().setIsChangable(!entity);
+                }
+            });
+            getAllowOverbooking().getEntityChangedEvent().addListener(new 
IEventListener() {
+                @Override
+                public void eventRaised(Event ev, Object sender, EventArgs 
args) {
+                    Boolean entity = (Boolean) 
getAllowOverbooking().getEntity();
+                    if (entity) {
+                        getOptimizeForUtilization().setEntity(true);
+                    }
+                    getOptimizeForSpeed().setIsChangable(!entity);
+                }
+            });
+        }
 
         AsyncQuery _asyncQuery = new AsyncQuery();
         _asyncQuery.setModel(this);
@@ -1134,6 +1191,10 @@
                     getOptimizeForSpeed().setEntity(false);
                 } else if (senderEntityModel == getOptimizeForSpeed()) {
                     getOptimizeForUtilization().setEntity(false);
+                } else if(senderEntityModel == getGuarantyResources()) {
+                    getAllowOverbooking().setEntity(false);
+                } else if(senderEntityModel == getAllowOverbooking()) {
+                    getGuarantyResources().setEntity(false);
                 }
             }
         }
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIMessages.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIMessages.java
index af82a30..d63a3c4 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIMessages.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIMessages.java
@@ -311,4 +311,10 @@
             "Utilization: include weight modules in shceduling to allow best 
selection\n" +
             "Speed: skip host weighing in case there are more than {0} pending 
requests")
     String schedulerOptimizationInfo(int numOfRequests);
+
+    @DefaultMessage("Overbooking: Allows running cluster''s scheduling 
requests in parallel, " +
+            "without preserving resource allocation. This option allows 
handling a mass of " +
+            "scheduling requests ({0} requests), while some requests may fail 
due to the re-use of the " +
+            "same resource allocation (Use this option only if you are 
familiar with this behavior).")
+    String schedulerAllowOverbookingInfo(int numOfRequests);
 }
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
index 2c37f96..ef79f44 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
@@ -3321,4 +3321,10 @@
 
     @DefaultStringValue("Scheduler Optimization")
     String schedulerOptimizationPanelLabel();
+
+    @DefaultStringValue("Allow Overbooking")
+    String allowOverbookingLabel();
+
+    @DefaultStringValue("Guaranty Resources")
+    String guarantyResourcesLabel();
 }
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java
index ce11562..fc7391a 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java
@@ -40,6 +40,7 @@
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
 import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.user.client.ui.VerticalPanel;
 import com.google.inject.Inject;
@@ -168,6 +169,9 @@
     InfoIcon memoryOptimizationInfo;
 
     @UiField(provided = true)
+    InfoIcon allowOverbookingInfoIcon;
+
+    @UiField(provided = true)
     @Path(value = "optimizationNone_IsSelected.entity")
     @WithElementId
     EntityModelRadioButtonEditor optimizationNoneEditor;
@@ -265,6 +269,19 @@
     @WithElementId
     EntityModelRadioButtonEditor optimizeForSpeedEditor;
 
+    @UiField
+    HorizontalPanel allowOverbookingPanel;
+
+    @UiField(provided = true)
+    @Path(value = "guarantyResources.entity")
+    @WithElementId
+    EntityModelRadioButtonEditor guarantyResourcesEditor;
+
+    @UiField(provided = true)
+    @Path(value = "allowOverbooking.entity")
+    @WithElementId
+    EntityModelRadioButtonEditor allowOverbookingEditor;
+
     private final Driver driver = GWT.create(Driver.class);
 
     private final ApplicationMessages messages;
@@ -298,7 +315,6 @@
 
         countThreadsAsCoresEditor.setContentWidgetStyleName(style.fullWidth());
         
enableTrustedServiceEditor.setContentWidgetStyleName(style.fullWidth());
-
     }
 
     private void localize(ApplicationConstants constants) {
@@ -347,6 +363,8 @@
         
schedulerOptimizationPanelTitle.setText(constants.schedulerOptimizationPanelLabel());
         
optimizeForUtilizationEditor.setLabel(constants.optimizeForUtilizationLabel());
         optimizeForSpeedEditor.setLabel(constants.optimizeForSpeedLabel());
+        guarantyResourcesEditor.setLabel(constants.guarantyResourcesLabel());
+        allowOverbookingEditor.setLabel(constants.allowOverbookingLabel());
     }
 
     private void initRadioButtonEditors() {
@@ -364,6 +382,9 @@
 
         optimizeForUtilizationEditor = new EntityModelRadioButtonEditor("3"); 
//$NON-NLS-1$
         optimizeForSpeedEditor = new EntityModelRadioButtonEditor("3"); 
//$NON-NLS-1$
+
+        guarantyResourcesEditor = new EntityModelRadioButtonEditor("4"); 
//$NON-NLS-1$
+        allowOverbookingEditor = new EntityModelRadioButtonEditor("4"); 
//$NON-NLS-1$
     }
 
     private void initListBoxEditors() {
@@ -407,7 +428,6 @@
 
         enableBallooning = new EntityModelCheckBoxEditor(Align.RIGHT);
         enableBallooning.getContentWidgetContainer().setWidth("350px"); 
//$NON-NLS-1$
-
     }
 
     private void initInfoIcons(ApplicationResources resources, 
ApplicationConstants constants, ApplicationTemplates templates)
@@ -416,6 +436,7 @@
 
         cpuThreadsInfo = new InfoIcon(templates.italicFixedWidth("600px", 
constants.clusterPopupCpuThreadsInfo()), resources); //$NON-NLS-1$
         schedulerOptimizationInfoIcon = new 
InfoIcon(SafeHtmlUtils.EMPTY_SAFE_HTML, resources);
+        allowOverbookingInfoIcon = new InfoIcon(SafeHtmlUtils.EMPTY_SAFE_HTML, 
resources);
     }
 
     private void applyModeCustomizations() {
@@ -505,6 +526,11 @@
                 templates.italicFixedWidth("350px", //$NON-NLS-1$
                 object.getSchedulerOptimizationInfoMessage()).asString()
                         .replaceAll("(\r\n|\n)", "<br />"))); //$NON-NLS-1$ 
//$NON-NLS-2$
+        allowOverbookingInfoIcon.setText(SafeHtmlUtils.fromTrustedString(
+                templates.italicFixedWidth("350px", //$NON-NLS-1$
+                        object.getAllowOverbookingInfoMessage()).asString()
+                        .replaceAll("(\r\n|\n)", "<br />"))); //$NON-NLS-1$ 
//$NON-NLS-2$
+        allowOverbookingPanel.setVisible(allowOverbookingEditor.isVisible());
     }
 
     private void optimizationForServerFormatter(ClusterModel object) {
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml
index 830e64e..2c85023 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml
@@ -229,6 +229,11 @@
                                                                                
<e:EntityModelRadioButtonEditor ui:field="optimizeForSpeedEditor" 
addStyleNames="{style.radioButtonLabel}" />
                                                                                
<d:InfoIcon ui:field="schedulerOptimizationInfoIcon" 
addStyleNames="{style.panelInfo}" />
                                                                        
</g:HorizontalPanel>
+                                                                       
<g:HorizontalPanel ui:field="allowOverbookingPanel">
+                                                                               
<e:EntityModelRadioButtonEditor ui:field="guarantyResourcesEditor" 
addStyleNames="{style.radioButtonLabel}"/>
+                                                                               
<e:EntityModelRadioButtonEditor ui:field="allowOverbookingEditor" 
addStyleNames="{style.radioButtonLabel}"/>
+                                                                               
<d:InfoIcon ui:field="allowOverbookingInfoIcon" 
addStyleNames="{style.panelInfo}" />
+                                                                       
</g:HorizontalPanel>
                                                                </g:FlowPanel>
                                                                <g:FlowPanel 
ui:field="additionPropsPanel" addStyleNames="{style.nestedSubsequentPanel}">
                                                                        
<g:Label ui:field="additionPropsPanelTitle" addStyleNames="{style.panelTitle}" 
/>
diff --git a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql 
b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
index 8545283..e230b3b 100644
--- a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
+++ b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
@@ -386,6 +386,8 @@
 select fn_db_add_config_value('PortMirroringSupported','false','3.0');
 select fn_db_add_config_value('PortMirroringSupported','false','3.1');
 select 
fn_db_add_config_value('SpeedOptimizationSchedulingThreshold','10','general');
+select fn_db_add_config_value('SchedulerAllowOverBooking','false','general');
+select fn_db_add_config_value('SchedulerOverBookingThreshold','10','general');
 --Handling Organization Name
 select fn_db_add_config_value('OrganizationName','oVirt','general');
 select fn_db_add_config_value('OriginType','OVIRT','general');
diff --git a/packaging/etc/engine-config/engine-config.properties 
b/packaging/etc/engine-config/engine-config.properties
index c4b71ff..5c377b4 100644
--- a/packaging/etc/engine-config/engine-config.properties
+++ b/packaging/etc/engine-config/engine-config.properties
@@ -344,3 +344,7 @@
 UseFqdnForRdpIfAvailable.description="If this option is enabled, the RDP 
console will use the FQDN, which is reported by the Guest Agent, if it is 
available and use this to establish the RDP connection."
 SpeedOptimizationSchedulingThreshold.description="Skip Host weights if there 
are more than X requests pending for scheduling (in case cluster is configured 
as optimize for speed)."
 SpeedOptimizationSchedulingThreshold.type=Integer
+SchedulerAllowOverBooking.description="Allowing skipping Scheduling resource 
synchronization, which could result in overbooking"
+SchedulerAllowOverBooking.type=Boolean
+SchedulerOverBookingThreshold.description="Skip Scheduling resource 
synchronization, which could result in overbooking, if there are more than X 
requests pending for scheduling (in case SchedulerAllowOverBooking=true and 
cluster is configured as allow overbooking)."
+SchedulerOverBookingThreshold.type=Integer


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

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

Reply via email to