Michael Kublin has uploaded a new change for review.

Change subject: engine: Setting reconstruct to failed when last master was 
disabled
......................................................................

engine: Setting reconstruct to failed when last master was disabled

The following commit is changing return value of reconstruct command to false
when we has only last master and it was changed to InActive status.
These fix is important for InitVdsOnUpCommand and also fixing an old bug - when 
a command
was marked as successed but audit log message was "Failed to ..."

Change-Id: I0e889d5e3022963bf835ea48674f23e80ca49675
Bug-Url: https://bugzilla.redhat.com/895996
Signed-off-by: Michael Kublin <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/01/11101/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java
index 89929a3..5890788 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java
@@ -144,7 +144,10 @@
                 // currently this method is used for both templates and vms.
                 
getVmStaticDAO().incrementDbGenerationForAllInStoragePool(getStoragePoolId().getValue());
             }
-            setSucceeded(reconstructOpSucceeded);
+            if(_isLastMaster) {
+                getCompensationContext().resetCompensation();
+            }
+            setSucceeded(!_isLastMaster && reconstructOpSucceeded);
         } finally {
             // reset cache and mark reconstruct for pool as finished
             Backend.getInstance()


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

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

Reply via email to