mooli tayer has uploaded a new change for review.

Change subject: backend: add documentation to vds manager
......................................................................

backend: add documentation to vds manager

Change-Id: I35f3fbfd76f4778859c15e7a9d499a7f302eda6b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1066693
Signed-off-by: Mooli Tayer <[email protected]>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
1 file changed, 10 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/59/26459/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
index 414e83e..b289fc9 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
@@ -475,11 +475,8 @@
     }
 
     /**
-     * This function called when vds have failed vm attempts one in predefined 
time. Its increments failure attempts to
-     * one
-     *
-     * @param obj
-     * @param arg
+     * This scheduled method allows this vds to recover from
+     * Error status.
      */
     @OnTimerMethodAnnotation("onVdsDuringFailureTimer")
     public void onVdsDuringFailureTimer() {
@@ -504,10 +501,18 @@
         }
     }
 
+    /**
+     * This callback method notifies this vds that an attempt to run a vm on it
+     * failed. above a certain threshold such hosts are marked as
+     * VDSStatus.Error.
+     *
+     * @param vds
+     */
     public void failedToRunVm(VDS vds) {
         if (mFailedToRunVmAttempts.get() < Config.<Integer> 
getValue(ConfigValues.NumberOfFailedRunsOnVds)
                 && mFailedToRunVmAttempts.incrementAndGet() >= Config
                         .<Integer> 
getValue(ConfigValues.NumberOfFailedRunsOnVds)) {
+            //Only one thread at a time can enter here
             
ResourceManager.getInstance().runVdsCommand(VDSCommandType.SetVdsStatus,
                     new SetVdsStatusVDSCommandParameters(vds.getId(), 
VDSStatus.Error));
 


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

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

Reply via email to