Hello Gilad Chaplik,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/20932

to review the following change.

Change subject: core: Log filtering progress in scheduling
......................................................................

core: Log filtering progress in scheduling

This logs the filtering step for each Host removal during the
scheduling operation to make debugging easier.

It also improves the error popup when scheduling
fails. The goal is to tell the user why his hosts
were removed from the decision process.

A logging is also added for the Pin To Host policy
unit.

https://bugzilla.redhat.com/show_bug.cgi?id=1002005

Change-Id: I4edcc33b0d280ab92e3c98d8d5a7a75386592e32
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1002005
Signed-off-by: Martin Sivak <[email protected]>
Signed-off-by: Gilad Chaplik <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PinToHostPolicyUnit.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
M 
frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/ApplicationMessages.java
M 
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M 
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationMessages.java
M 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
15 files changed, 182 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/32/20932/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
index 32ecfe6..6b0310e 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
@@ -97,7 +97,8 @@
                         getVdsWhiteList(),
                         destVds == null ? null : destVds.getId(),
                         new ArrayList<String>(),
-                        new VdsFreeMemoryChecker(this));
+                        new VdsFreeMemoryChecker(this),
+                        getCorrelationId());
         setVdsDestinationId(vdsToRunOn);
         if (vdsToRunOn != null && !Guid.Empty.equals(vdsToRunOn)) {
             getRunVdssList().add(vdsToRunOn);
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
index 7281d79..d085da2 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
@@ -664,11 +664,13 @@
                         getVdsWhiteList(),
                         destinationVds == null ? null : destinationVds.getId(),
                         new ArrayList<String>(),
-                        new VdsFreeMemoryChecker(this));
+                        new VdsFreeMemoryChecker(this),
+                        getCorrelationId());
         setVdsId(vdsToRunOn);
         if (vdsToRunOn != null && !Guid.Empty.equals(vdsToRunOn)) {
             getRunVdssList().add(vdsToRunOn);
         }
+
         VmHandler.updateVmGuestAgentVersion(getVm());
         setVds(null);
         setVdsName(null);
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 a5ac117..fd8a45d 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
@@ -1,6 +1,8 @@
 package org.ovirt.engine.core.bll.scheduling;
 
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
@@ -13,6 +15,7 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.commons.lang.StringUtils;
 import 
org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread;
 import org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerFactory;
 import org.ovirt.engine.core.common.businessentities.BusinessEntity;
@@ -22,6 +25,7 @@
 import org.ovirt.engine.core.common.businessentities.VM;
 import org.ovirt.engine.core.common.config.Config;
 import org.ovirt.engine.core.common.config.ConfigValues;
+import org.ovirt.engine.core.common.errors.VdcBllMessages;
 import org.ovirt.engine.core.common.scheduling.ClusterPolicy;
 import org.ovirt.engine.core.common.scheduling.PolicyUnit;
 import org.ovirt.engine.core.common.utils.Pair;
@@ -163,13 +167,64 @@
         }
     }
 
+    private static class SchedulingResult {
+        Map<Guid, Pair<VdcBllMessages, String>> filteredOutReasons;
+        Map<Guid, String> hostNames;
+        String message;
+        Guid vdsSelected = null;
+
+        public SchedulingResult() {
+            filteredOutReasons = new HashMap<Guid, Pair<VdcBllMessages, 
String>>();
+            hostNames = new HashMap<>();
+        }
+
+        public Guid getVdsSelected() {
+            return vdsSelected;
+        }
+
+        public void setVdsSelected(Guid vdsSelected) {
+            this.vdsSelected = vdsSelected;
+        }
+
+        public void addReason(Guid id, String hostName, VdcBllMessages 
filterType, String filterName) {
+            filteredOutReasons.put(id, new Pair<VdcBllMessages, 
String>(filterType, filterName));
+            hostNames.put(id, hostName);
+        }
+
+        public Set<Entry<Guid, Pair<VdcBllMessages, String>>> getReasons() {
+            return filteredOutReasons.entrySet();
+        }
+
+        public Collection<String> getReasonMessages() {
+            List<String> lines = new ArrayList<>();
+
+            for (Entry<Guid, Pair<VdcBllMessages, String>> line: 
filteredOutReasons.entrySet()) {
+                lines.add(line.getValue().getFirst().name());
+                lines.add(String.format("$%1$s %2$s", "hostName", 
hostNames.get(line.getKey())));
+                lines.add(String.format("$%1$s %2$s", "filterName", 
line.getValue().getSecond()));
+                
lines.add(VdcBllMessages.SCHEDULING_HOST_FILTERED_REASON.name());
+            }
+
+            return lines;
+        }
+
+        public String getMessage() {
+            return message;
+        }
+
+        public void setMessage(String message) {
+            this.message = message;
+        }
+    }
+
     public Guid schedule(VDSGroup cluster,
             VM vm,
             List<Guid> hostBlackList,
             List<Guid> hostWhiteList,
             Guid destHostId,
             List<String> messages,
-            VdsFreeMemoryChecker memoryChecker) {
+            VdsFreeMemoryChecker memoryChecker,
+            String correlationId) {
         clusterLockMap.putIfAbsent(cluster.getId(), new Object());
         synchronized (clusterLockMap.get(cluster.getId())) {
             List<VDS> vdsList = getVdsDAO()
@@ -187,7 +242,8 @@
                             policy.getFilterPositionMap(),
                             messages,
                             memoryChecker,
-                            true);
+                            true,
+                            correlationId);
 
             if (vdsList == null || vdsList.size() == 0) {
                 return null;
@@ -242,7 +298,8 @@
                         policy.getFilterPositionMap(),
                         messages,
                         noWaitingMemoryChecker,
-                        false);
+                        false,
+                        null);
 
         if (vdsList == null || vdsList.size() == 0) {
             return false;
@@ -284,8 +341,11 @@
             VM vm,
             Map<String, String> parameters,
             Map<Guid, Integer> filterPositionMap,
-            List<String> messages, VdsFreeMemoryChecker memoryChecker,
-            boolean shouldRunExternalFilters) {
+            List<String> messages,
+            VdsFreeMemoryChecker memoryChecker,
+            boolean shouldRunExternalFilters,
+            String correlationId) {
+        SchedulingResult result = new SchedulingResult();
         ArrayList<PolicyUnitImpl> internalFilters = new 
ArrayList<PolicyUnitImpl>();
         ArrayList<PolicyUnitImpl> externalFilters = new 
ArrayList<PolicyUnitImpl>();
         sortFilters(filters, filterPositionMap);
@@ -303,16 +363,21 @@
         }
 
         hostList =
-                runInternalFilters(internalFilters, hostList, vm, parameters, 
filterPositionMap, messages, memoryChecker);
+                runInternalFilters(internalFilters, hostList, vm, parameters, 
filterPositionMap, messages,
+                        memoryChecker, correlationId, result);
 
         if (shouldRunExternalFilters
                 && Config.<Boolean> 
GetValue(ConfigValues.ExternalSchedulerEnabled)
                 && externalFilters.size() > 0
                 && hostList != null
                 && hostList.size() > 0) {
-            hostList = runExternalFilters(externalFilters, hostList, vm, 
parameters, messages);
+            hostList = runExternalFilters(externalFilters, hostList, vm, 
parameters, messages, correlationId, result);
         }
 
+        if (hostList == null || hostList.size() == 0) {
+            
messages.add(VdcBllMessages.SCHEDULING_ALL_HOSTS_FILTERED_OUT.name());
+            messages.addAll(result.getReasonMessages());
+        }
         return hostList;
     }
 
@@ -321,24 +386,66 @@
             VM vm,
             Map<String, String> parameters,
             Map<Guid, Integer> filterPositionMap,
-            List<String> messages, VdsFreeMemoryChecker memoryChecker) {
+            List<String> messages, VdsFreeMemoryChecker memoryChecker,
+            String correlationId, SchedulingResult result) {
         if (filters != null) {
             for (PolicyUnitImpl filterPolicyUnit : filters) {
                 if (hostList == null || hostList.isEmpty()) {
                     break;
                 }
                 filterPolicyUnit.setMemoryChecker(memoryChecker);
+                List<VDS> currentHostList = new ArrayList<VDS>(hostList);
                 hostList = filterPolicyUnit.filter(hostList, vm, parameters, 
messages);
+                logFilterActions(currentHostList,
+                        toIdSet(hostList),
+                        VdcBllMessages.VAR__FILTERTYPE__INTERNAL,
+                        filterPolicyUnit.getName(),
+                        result,
+                        correlationId);
             }
         }
         return hostList;
+    }
+
+    private Set<Guid> toIdSet(List<VDS> hostList) {
+        Set<Guid> set = new HashSet<Guid>();
+        if (hostList != null) {
+            for (VDS vds : hostList) {
+                set.add(vds.getId());
+            }
+        }
+        return set;
+    }
+
+    private void logFilterActions(List<VDS> oldList,
+            Set<Guid> newSet,
+            VdcBllMessages actionName,
+            String filterName,
+            SchedulingResult result,
+            String correlationId) {
+        for (VDS host: oldList) {
+            if (!newSet.contains(host.getId())) {
+                String reason =
+                        String.format("Candidate host %s (%s) was filtered out 
by %s filter %s",
+                                host.getName(),
+                                host.getId().toString(),
+                                actionName.name(),
+                                filterName);
+                if (!StringUtils.isEmpty(correlationId)) {
+                    reason = String.format("%s (correlation id: %s)", reason, 
correlationId);
+                }
+                log.info(reason);
+                result.addReason(host.getId(), host.getName(), actionName, 
filterName);
+            }
+        }
     }
 
     private List<VDS> runExternalFilters(ArrayList<PolicyUnitImpl> filters,
             List<VDS> hostList,
             VM vm,
             Map<String, String> parameters,
-            List<String> messages) {
+            List<String> messages,
+            String correlationId, SchedulingResult result) {
         List<Guid> filteredIDs = null;
         if (filters != null) {
             List<String> filterNames = new ArrayList<String>();
@@ -349,8 +456,17 @@
             for (VDS host : hostList) {
                 hostIDs.add(host.getId());
             }
+
             filteredIDs =
                     
ExternalSchedulerFactory.getInstance().runFilters(filterNames, hostIDs, 
vm.getId(), parameters);
+            if (filteredIDs != null) {
+                logFilterActions(hostList,
+                        new HashSet<Guid>(filteredIDs),
+                        VdcBllMessages.VAR__FILTERTYPE__EXTERNAL,
+                        Arrays.toString(filterNames.toArray()),
+                        result,
+                        correlationId);
+            }
         }
 
         return intersectHosts(hostList, filteredIDs);
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PinToHostPolicyUnit.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PinToHostPolicyUnit.java
index acc3a07..ee5613e 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PinToHostPolicyUnit.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PinToHostPolicyUnit.java
@@ -9,7 +9,6 @@
 import org.ovirt.engine.core.common.businessentities.MigrationSupport;
 import org.ovirt.engine.core.common.businessentities.VDS;
 import org.ovirt.engine.core.common.businessentities.VM;
-import org.ovirt.engine.core.common.errors.VdcBllMessages;
 import org.ovirt.engine.core.common.scheduling.PolicyUnit;
 
 public class PinToHostPolicyUnit extends PolicyUnitImpl {
@@ -28,9 +27,9 @@
             }
 
             // if flow reaches here, the VM is pinned but there is no 
dedicated host.
-            
messages.add(VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_PINNED_TO_HOST.toString());
             return new ArrayList<>();
         }
+
         return hosts;
     }
 }
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java
index db680c4..9cc975f 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java
@@ -830,6 +830,12 @@
     //exteral scheduler
     EXTERNAL_SCHEDULER_FAIL(ErrorType.INTERNAL_ERROR),
 
+    // scheduling
+    VAR__FILTERTYPE__INTERNAL,
+    VAR__FILTERTYPE__EXTERNAL,
+    SCHEDULING_HOST_FILTERED_REASON,
+    SCHEDULING_ALL_HOSTS_FILTERED_OUT(ErrorType.CONFLICT),
+
     // memory QOS features
     QOS_BALLOON_NOT_SUPPORTED(ErrorType.BAD_PARAMETERS),
 
diff --git 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
index e2c8e20..b0e0eca 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -1041,3 +1041,8 @@
 
 # Alignment scan
 ERROR_CANNOT_RUN_ALIGNMENT_SCAN_VM_IS_RUNNING=Cannot ${action} ${type}. 
Alignment scan of a disk attached to a running VM is only supported with RAW 
virtual disks.
+
+SCHEDULING_ALL_HOSTS_FILTERED_OUT=Cannot ${action} ${type}. There is no host 
that satisfies current scheduling constraints. See bellow for details:
+SCHEDULING_HOST_FILTERED_REASON=The host ${hostName} did not satisfy 
${filterType} filter ${filterName}.
+VAR__FILTERTYPE__EXTERNAL=$filterType external
+VAR__FILTERTYPE__INTERNAL=$filterType internal
diff --git 
a/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties 
b/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
index 9be6f5f..28de10f 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
@@ -402,3 +402,4 @@
 VolumeResizeValueError=Incorrect size value for volume resize
 ResizeErr=Wrong resize disk parameter
 UpdateDevice=Failed to update device
+SCHEDULING_ALL_HOSTS_FILTERED_OUT=Scheduling failed, no host satisfies the 
conditions.
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
index b52b1db..0a2c28a 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
@@ -697,9 +697,6 @@
     @DefaultStringValue("$type Cluster Policy")
     String VAR__TYPE__CLUSTER_POLICY();
 
-    @DefaultStringValue("$type Policy Unit")
-    String VAR__TYPE__POLICY_UNIT();
-
     @DefaultStringValue("$action run")
     String VAR__ACTION__RUN();
 
@@ -1359,6 +1356,9 @@
 
     @DefaultStringValue("MAC Address is already in use.")
     String NETWORK_MAC_ADDRESS_IN_USE();
+
+    @DefaultStringValue("The specified MAC Address cannot be set.\n-Please 
check MAC Address validity.")
+    String NETWORK_INVALID_MAC_ADDRESS();
 
     @DefaultStringValue("Cannot ${action} ${type}. There is at least one 
running VM that uses this Network.")
     String NETWORK_INTERFACE_IN_USE_BY_VM();
@@ -2735,9 +2735,6 @@
     @DefaultStringValue("Cannot ${action} ${type}. Function factor cannot be 
negative.")
     String ACTION_TYPE_FAILED_CLUSTER_POLICY_FUNCTION_FACTOR_NEGATIVE();
 
-    @DefaultStringValue("Cannot ${action} ${type}. Policy unit is attached to 
the following cluster policies: ${cpNames}.")
-    String 
ACTION_TYPE_FAILED_CANNOT_REMOVE_POLICY_UNIT_ATTACHED_TO_CLUSTER_POLICY();
-
     @DefaultStringValue("Cannot ${action} ${type}. Cloud-Init is only 
supported on cluster compatibility version 3.3 and higher.")
     String ACTION_TYPE_FAILED_CLOUD_INIT_IS_NOT_SUPPORTED();
 
@@ -2755,4 +2752,16 @@
 
     @DefaultStringValue("Cannot ${action} ${type}. Disk ${DiskAlias} alignment 
is currently being determined.")
     String ACTION_TYPE_FAILED_DISK_IS_USED_BY_GET_ALIGNMENT();
+
+    @DefaultStringValue("$filterType external")
+    String VAR__FILTERTYPE__INTERNAL();
+
+    @DefaultStringValue("$filterType internal")
+    String VAR__FILTERTYPE__EXTERNAL();
+
+    @DefaultStringValue("The host ${hostName} did not satisfy ${filterType} 
filter ${filterName}.")
+    String SCHEDULING_HOST_FILTERED_REASON();
+
+    @DefaultStringValue("Cannot ${action} ${type}. There is no host that 
satisfies current scheduling constraints. See bellow for details:")
+    String SCHEDULING_ALL_HOSTS_FILTERED_OUT();
 }
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
index 7f27457..1ac1cc4 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
@@ -783,4 +783,10 @@
 
     @DefaultStringValue("Failed to get gluster volume rebalance status")
     String GlusterVolumeRebalanceStatusFailedException();
+
+    @DefaultStringValue("Failed to get status of gluster volume remove bricks")
+    String GlusterVolumeRemoveBrickStatusFailed();
+
+    @DefaultStringValue("Scheduling failed no host satisfies the conditions")
+    String SCHEDULING_ALL_HOSTS_FILTERED_OUT();
 }
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/ApplicationMessages.java
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/ApplicationMessages.java
index a8d2ed3..fb3ae45 100644
--- 
a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/ApplicationMessages.java
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/ApplicationMessages.java
@@ -15,4 +15,7 @@
 
     @DefaultMessage("Exceeded {0}% / {1}GB")
     String exceedingStorage(int percentage, double gb);
+
+    @DefaultMessage("Host {0} was filtered out by {1} filter {2}")
+    String schedulingHostFilteredOutReason(String host, String filterLocation, 
String filterName);
 }
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
index f8539dc..76eea71 100644
--- 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
@@ -912,3 +912,8 @@
 
 # Alignment scan
 ERROR_CANNOT_RUN_ALIGNMENT_SCAN_VM_IS_RUNNING=Cannot ${action} ${type}. 
Alignment scan of a disk attached to a running VM is only supported with RAW 
virtual disks.
+
+SCHEDULING_ALL_HOSTS_FILTERED_OUT=Cannot ${action} ${type}. There is no host 
that satisfies current scheduling constraints. See bellow for details:
+SCHEDULING_HOST_FILTERED_REASON=The host ${hostName} did not satisfy 
${filterType} filter ${filterName}.
+VAR__FILTERTYPE__EXTERNAL=$filterType external
+VAR__FILTERTYPE__INTERNAL=$filterType internal
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
index f510ad9..192d5a2 100644
--- 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
@@ -339,3 +339,4 @@
 ACTIVATE_NIC_FAILED=Failed to activate VM Network Interface.
 DEACTIVATE_NIC_FAILED=Failed to deactivate VM Network Interface.
 UPDATE_VNIC_FAILED=Failed to update VM Network Interface.
+SCHEDULING_ALL_HOSTS_FILTERED_OUT=Scheduling failed, no host satisfies the 
conditions.
\ No newline at end of file
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationMessages.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationMessages.java
index 8eca4ab..7e2d235 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationMessages.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationMessages.java
@@ -3,8 +3,6 @@
 import org.ovirt.engine.core.common.job.JobExecutionStatus;
 import org.ovirt.engine.ui.common.CommonApplicationMessages;
 
-import com.google.gwt.i18n.client.Messages.DefaultMessage;
-
 public interface ApplicationMessages extends CommonApplicationMessages {
 
     @DefaultMessage("A new version is available; an upgrade option will appear 
once the Host is moved to maintenance mode.")
@@ -103,4 +101,7 @@
 
     @DefaultMessage("{0} Gb")
     String rebalanceFileSizeGb(long size);
+
+    @DefaultMessage("Host {0} was filtered out by {1} filter {2}")
+    String schedulingHostFilteredOutReason(String host, String filterLocation, 
String filterName);
 }
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
index d9a08f8..4210833 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
+++ 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
@@ -1014,3 +1014,8 @@
 
 # Alignment scan
 ERROR_CANNOT_RUN_ALIGNMENT_SCAN_VM_IS_RUNNING=Cannot ${action} ${type}. 
Alignment scan of a disk attached to a running VM is only supported with RAW 
virtual disks.
+
+SCHEDULING_ALL_HOSTS_FILTERED_OUT=Cannot ${action} ${type}. There is no host 
that satisfies current scheduling constraints. See bellow for details:
+SCHEDULING_HOST_FILTERED_REASON=The host ${hostName} did not satisfy 
${filterType} filter ${filterName}.
+VAR__FILTERTYPE__EXTERNAL=$filterType external
+VAR__FILTERTYPE__INTERNAL=$filterType internal
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
index 6cd371a..a28aca4 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
+++ 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
@@ -370,3 +370,4 @@
 GlusterServiceActionNotSupported=Gluster service action not supported
 GlusterVolumeStatusAllFailedException=Failed to get gluster tasks list
 GlusterVolumeRebalanceStatusFailedException=Failed to get gluster volume 
rebalance status
+SCHEDULING_ALL_HOSTS_FILTERED_OUT=Scheduling failed, no host satisfies the 
conditions.


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

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

Reply via email to