Martin Sivák has uploaded a new change for review.

Change subject: engine: Revert parts of 34a62959369617e6191ca71c3ec73f93e002e957
......................................................................

engine: Revert parts of 34a62959369617e6191ca71c3ec73f93e002e957

This should have never get in the patchset. Probably a rebase
leftover...

Change-Id: I6f1bdb083e4fde3025dff6f79b9145a257338c37
Signed-off-by: Martin Sivak <[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, 54 insertions(+), 179 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/11/21511/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 13dbecd..d82f205 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,8 +97,7 @@
                         getVdsWhiteList(),
                         destVds == null ? null : destVds.getId(),
                         new ArrayList<String>(),
-                        new VdsFreeMemoryChecker(this),
-                        getCorrelationId());
+                        new VdsFreeMemoryChecker(this));
         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 2aeff5f..d007e5e 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
@@ -660,13 +660,11 @@
                         getVdsWhiteList(),
                         destinationVds == null ? null : destinationVds.getId(),
                         new ArrayList<String>(),
-                        new VdsFreeMemoryChecker(this),
-                        getCorrelationId());
+                        new VdsFreeMemoryChecker(this));
         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 87ae7d3..c8b546c 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,8 +1,6 @@
 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;
@@ -15,7 +13,6 @@
 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;
@@ -25,7 +22,6 @@
 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;
@@ -167,64 +163,13 @@
         }
     }
 
-    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,
-            String correlationId) {
+            VdsFreeMemoryChecker memoryChecker) {
         clusterLockMap.putIfAbsent(cluster.getId(), new Object());
         synchronized (clusterLockMap.get(cluster.getId())) {
             List<VDS> vdsList = getVdsDAO()
@@ -242,8 +187,7 @@
                             policy.getFilterPositionMap(),
                             messages,
                             memoryChecker,
-                            true,
-                            correlationId);
+                            true);
 
             if (vdsList == null || vdsList.size() == 0) {
                 return null;
@@ -298,8 +242,7 @@
                         policy.getFilterPositionMap(),
                         messages,
                         noWaitingMemoryChecker,
-                        false,
-                        null);
+                        false);
 
         if (vdsList == null || vdsList.size() == 0) {
             return false;
@@ -341,11 +284,8 @@
             VM vm,
             Map<String, String> parameters,
             Map<Guid, Integer> filterPositionMap,
-            List<String> messages,
-            VdsFreeMemoryChecker memoryChecker,
-            boolean shouldRunExternalFilters,
-            String correlationId) {
-        SchedulingResult result = new SchedulingResult();
+            List<String> messages, VdsFreeMemoryChecker memoryChecker,
+            boolean shouldRunExternalFilters) {
         ArrayList<PolicyUnitImpl> internalFilters = new 
ArrayList<PolicyUnitImpl>();
         ArrayList<PolicyUnitImpl> externalFilters = new 
ArrayList<PolicyUnitImpl>();
         sortFilters(filters, filterPositionMap);
@@ -363,21 +303,16 @@
         }
 
         hostList =
-                runInternalFilters(internalFilters, hostList, vm, parameters, 
filterPositionMap, messages,
-                        memoryChecker, correlationId, result);
+                runInternalFilters(internalFilters, hostList, vm, parameters, 
filterPositionMap, messages, memoryChecker);
 
         if (shouldRunExternalFilters
                 && Config.<Boolean> 
GetValue(ConfigValues.ExternalSchedulerEnabled)
                 && externalFilters.size() > 0
                 && hostList != null
                 && hostList.size() > 0) {
-            hostList = runExternalFilters(externalFilters, hostList, vm, 
parameters, messages, correlationId, result);
+            hostList = runExternalFilters(externalFilters, hostList, vm, 
parameters, messages);
         }
 
-        if (hostList == null || hostList.size() == 0) {
-            
messages.add(VdcBllMessages.SCHEDULING_ALL_HOSTS_FILTERED_OUT.name());
-            messages.addAll(result.getReasonMessages());
-        }
         return hostList;
     }
 
@@ -386,66 +321,24 @@
             VM vm,
             Map<String, String> parameters,
             Map<Guid, Integer> filterPositionMap,
-            List<String> messages, VdsFreeMemoryChecker memoryChecker,
-            String correlationId, SchedulingResult result) {
+            List<String> messages, VdsFreeMemoryChecker memoryChecker) {
         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,
-            String correlationId, SchedulingResult result) {
+            List<String> messages) {
         List<Guid> filteredIDs = null;
         if (filters != null) {
             List<String> filterNames = new ArrayList<String>();
@@ -456,17 +349,8 @@
             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 a66922d..aadf0fe 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,6 +9,7 @@
 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 {
@@ -35,9 +36,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 d5c3c68..38bc7c0 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
@@ -849,12 +849,6 @@
     //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 dcc1342..cd5bcbc 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -1057,8 +1057,5 @@
 # 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
 POWER_MANAGEMENT_ACTION_ON_ENTITY_ALREADY_IN_PROGRESS=Cannot perform 
${action}. Another power management action is already in progress.
+
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 614a479..5aa40c2 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
@@ -406,4 +406,3 @@
 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 00404e3..83879ff 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
@@ -559,6 +559,12 @@
     @DefaultStringValue("Cannot ${action} ${type}. The relevant Template 
doesn't exist.")
     String ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST();
 
+    @DefaultStringValue("Cannot ${action} ${type}. The relevant Instance Type 
doesn't exist.")
+    String ACTION_TYPE_FAILED_INSTANCE_TYPE_DOES_NOT_EXIST();
+
+    @DefaultStringValue("Cannot ${action} ${type}. The relevant Image Type 
doesn't exist.")
+    String ACTION_TYPE_FAILED_IMAGE_TYPE_DOES_NOT_EXIST();
+
     @DefaultStringValue("Cannot ${action} ${type}. The Template is disabled, 
please try to enable the template first and try again.")
     String ACTION_TYPE_FAILED_TEMPLATE_IS_DISABLED();
 
@@ -697,6 +703,9 @@
     @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();
 
@@ -828,6 +837,12 @@
 
     @DefaultStringValue("$action stop rebalance")
     String VAR__ACTION__REBALANCE_STOP();
+
+    @DefaultStringValue("$action start removing")
+    String VAR__ACTION__REMOVE_BRICKS_START();
+
+    @DefaultStringValue("$action stop remove bricks")
+    String VAR__ACTION__REMOVE_BRICKS_STOP();
 
     @DefaultStringValue("$action start profiling")
     String VAR__ACTION__START_PROFILE();
@@ -1359,9 +1374,6 @@
 
     @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();
@@ -2498,11 +2510,20 @@
     @DefaultStringValue("Cannot ${action} ${type}. Cannot remove all the 
bricks from a Volume.")
     String ACTION_TYPE_FAILED_CAN_NOT_REMOVE_ALL_BRICKS_FROM_VOLUME();
 
+    @DefaultStringValue("Cannot ${action} ${type}. Remove brick not started.")
+    String ACTION_TYPE_FAILED_GLUSTER_VOLUME_REMOVE_BRICKS_NOT_STARTED();
+
+    @DefaultStringValue("Cannot ${action} ${type}. Remove brick not finished.")
+    String ACTION_TYPE_FAILED_GLUSTER_VOLUME_REMOVE_BRICKS_NOT_FINISHED();
+
     @DefaultStringValue("Cannot ${action} ${type}. Gluster Volume should be 
started.")
     String ACTION_TYPE_FAILED_GLUSTER_VOLUME_SHOULD_BE_STARTED();
 
-    @DefaultStringValue("Cannot ${action} ${type}. Gluster Volume bricks are 
not distributed.")
-    String ACTION_TYPE_FAILED_GLUSTER_VOLUME_BRICKS_ARE_NOT_DISTRIBUTED();
+    @DefaultStringValue("Cannot ${action} ${type}. Gluster Volume is not 
distributed.")
+    String ACTION_TYPE_FAILED_GLUSTER_VOLUME_NOT_DISTRIBUTED();
+
+    @DefaultStringValue("Cannot ${action} ${type}. Gluster Volume has a single 
brick.")
+    String 
ACTION_TYPE_FAILED_GLUSTER_VOLUME_DISTRIBUTED_AND_HAS_SINGLE_BRICK();
 
     @DefaultStringValue("Cannot ${action} ${type}. Replacing brick is not a 
Gluster volume brick.")
     String ACTION_TYPE_FAILED_NOT_A_GLUSTER_VOLUME_BRICK();
@@ -2563,6 +2584,9 @@
 
     @DefaultStringValue("Cannot ${action} ${type}. Rebalance is not running on 
the volume ${volumeName} in cluster ${vdsGroup}.")
     String ACTION_TYPE_FAILED_GLUSTER_VOLUME_REBALANCE_NOT_STARTED();
+
+    @DefaultStringValue("Cannot ${action} ${type}. Rebalance is running on the 
volume ${volumeName} in cluster ${vdsGroup}.")
+    String 
ACTION_TYPE_FAILED_GLUSTER_VOLUME_CANNOT_STOP_REBALANCE_IN_PROGRESS();
 
     @DefaultStringValue("Cannot ${action} ${type}. The Network Interface 
${IfaceName} has an invalid MAC address ${MacAddress}. MAC address must be in 
format \"HH:HH:HH:HH:HH:HH\" where H is a hexadecimal character (either a digit 
or A-F, case is insignificant).")
     String ACTION_TYPE_FAILED_NETWORK_INTERFACE_MAC_INVALID();
@@ -2647,6 +2671,9 @@
 
     @DefaultStringValue("Cannot ${action} ${type}. Gluster service is not 
supported in compatibility version ${compatibilityVersion}.")
     String GLUSTER_NOT_SUPPORTED();
+
+    @DefaultStringValue("Volume id is invalid.")
+    String GLUSTER_VOLUME_ID_INVALID();
 
     @Constants.DefaultStringValue("Failed to run LDAP query, please check 
server logs for more info.")
     String FAILED_TO_RUN_LDAP_QUERY();
@@ -2741,6 +2768,9 @@
     @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();
 
@@ -2764,18 +2794,6 @@
 
     @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();
 
     @DefaultStringValue("Cannot perform ${action}. Another power management 
action is already in progress.")
     String POWER_MANAGEMENT_ACTION_ON_ENTITY_ALREADY_IN_PROGRESS();
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 6b734eb..ad89a7f 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
@@ -795,7 +795,4 @@
 
     @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 fb3ae45..a8d2ed3 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,7 +15,4 @@
 
     @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 7ac02db..80c6c33 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
@@ -914,8 +914,5 @@
 # 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
-POWER_MANAGEMENT_ACTION_ON_ENTITY_ALREADY_IN_PROGRESS=Cannot perform 
${action}. Another power management action is already in progress.
\ No newline at end of file
+POWER_MANAGEMENT_ACTION_ON_ENTITY_ALREADY_IN_PROGRESS=Cannot perform 
${action}. Another power management action is already in progress.
+
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 8ec426f..85ca8a7 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,4 +339,3 @@
 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 762695e..1c550e0 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,6 +3,8 @@
 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.")
@@ -101,7 +103,4 @@
 
     @DefaultMessage("{0} GB")
     String rebalanceFileSizeGb(String 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 9d5b68a..361b0fc 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
@@ -1030,8 +1030,5 @@
 # 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
 POWER_MANAGEMENT_ACTION_ON_ENTITY_ALREADY_IN_PROGRESS=Another power management 
action, ${action}, is already in progress.
+
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 be8498a..77946f9 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
@@ -374,4 +374,3 @@
 GlusterHostRemoveFailedException=Gluster Host Remove Failed
 GlusterVolumeRebalanceStatusFailedException=Failed to get gluster volume 
rebalance status
 GlusterVolumeRemoveBrickStatusFailed=Failed to get status of gluster volume 
remove bricks
-SCHEDULING_ALL_HOSTS_FILTERED_OUT=Scheduling failed, no host satisfies the 
conditions.


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

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

Reply via email to