Gilad Chaplik has uploaded a new change for review.

Change subject: core: scheduling: handle external scheduler failure
......................................................................

core: scheduling: handle external scheduler failure

in case the external scheduler fails, continue with scheduling
process, 'skipping' external scheduler (no) results

Change-Id: I11cc70260e99cee7c563cb727274608e325da354
Signed-off-by: Gilad Chaplik <[email protected]>
---
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/external/ExternalSchedulerBrokerImpl.java
2 files changed, 8 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/66/18566/1

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 f26fbc0..eddf180 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
@@ -497,7 +497,9 @@
                         hostIDs,
                         vm.getId(),
                         parameters);
-        sumScoreResults(hostCostTable, externalScores);
+        if (externalScores != null) {
+            sumScoreResults(hostCostTable, externalScores);
+        }
     }
 
     private void sumScoreResults(Map<Guid, Integer> hostCostTable, 
List<Pair<Guid, Integer>> externalScores) {
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerBrokerImpl.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerBrokerImpl.java
index 2eee70c..d1f4a1a 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerBrokerImpl.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerBrokerImpl.java
@@ -51,10 +51,7 @@
             return parseDiscoverResults(result);
 
         } catch (XmlRpcException e) {
-            log.error("Could not communicate with the external scheduler while 
discovering" + e);
-            // TODO: decision is needed what to do here:
-            // - return all vds without filtering?
-            // - return empty vds list?
+            log.error("Could not communicate with the external scheduler while 
discovering", e);
             return null;
         }
     }
@@ -81,11 +78,8 @@
             return parseFilterResults(result);
 
         } catch (XmlRpcException e) {
-            log.error("Could not communicate with the external scheduler while 
filtering " + e);
-            // TODO: decision is needed what to do here:
-            // - return all vds without filtering?
-            // - return empty vds list?
-            return null;
+            log.error("Could not communicate with the external scheduler while 
filtering", e);
+            return hostIDs;
         }
     }
 
@@ -134,10 +128,7 @@
             return parseScoreResults(result);
 
         } catch (XmlRpcException e) {
-            log.error("Could not communicate with the external scheduler while 
running score functions " + e);
-            // TODO: decision is needed what to do here:
-            // - return all vds without filtering?
-            // - return empty vds list?
+            log.error("Could not communicate with the external scheduler while 
running weight modules", e);
             return null;
         }
     }
@@ -202,10 +193,7 @@
             return parseBalanceResults(result);
 
         } catch (XmlRpcException e) {
-            log.error("Could not communicate with the external scheduler while 
balancing " + e);
-            // TODO: decision is needed what to do here:
-            // - return all vds without filtering?
-            // - return empty vds list?
+            log.error("Could not communicate with the external scheduler while 
balancing", e);
             return null;
         }
     }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11cc70260e99cee7c563cb727274608e325da354
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