Roy Golan has uploaded a new change for review.

Change subject: core: don't skip storagePoolStatusChange call
......................................................................

core: don't skip storagePoolStatusChange call

storagePoolStatusChange is only being called once, when there is no SPM
so subsequent retires to select an SPM will not fire
SetPoolStatusCommand.
When an engine-SPM connection is lost and the domains got activated,
we must make sure the next attempt will put them to UNKNOWN when there
is spm selection failure

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=975742
Change-Id: I37741911c8e22f7534516d3ed8bccca6b311dc92
Signed-off-by: Roy Golan <rgo...@redhat.com>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
1 file changed, 10 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/27/20527/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
index a26b3bd..264ccd3 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
@@ -592,18 +592,15 @@
             // configurable timeout is reached)
             waitForVdsIfIsInitializing(curVdsId);
             // update pool status to problematic while selecting spm
-            StoragePoolStatus prevStatus = storagePool.getStatus();
-            if (prevStatus != StoragePoolStatus.NonResponsive) {
-                try {
-                    ResourceManager
-                            .getInstance()
-                            .getEventListener()
-                            .storagePoolStatusChange(_storagePoolId, 
StoragePoolStatus.NonResponsive,
-                                    
AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_SEARCHING_NEW_SPM,
-                                    VdcBllErrors.ENGINE, 
TransactionScopeOption.RequiresNew);
-                } catch (RuntimeException ex) {
-                    throw new IRSStoragePoolStatusException(ex);
-                }
+            try {
+                ResourceManager
+                        .getInstance()
+                        .getEventListener()
+                        .storagePoolStatusChange(_storagePoolId, 
StoragePoolStatus.NonResponsive,
+                                
AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_SEARCHING_NEW_SPM,
+                                VdcBllErrors.ENGINE, 
TransactionScopeOption.RequiresNew);
+            } catch (RuntimeException ex) {
+                throw new IRSStoragePoolStatusException(ex);
             }
             VDS selectedVds = null;
             SpmStatusResult spmStatus = null;
@@ -669,7 +666,7 @@
                     if (selectedVds != null) {
                         RefObject<VDS> tempRefObject2 = new 
RefObject<VDS>(selectedVds);
                         RefObject<SpmStatusResult> tempRefObject3 = new 
RefObject<SpmStatusResult>(spmStatus);
-                        returnValue = handleSelectedVdsForSPM(storagePool, 
tempRefObject2, tempRefObject3, prevStatus);
+                        returnValue = handleSelectedVdsForSPM(storagePool, 
tempRefObject2, tempRefObject3, storagePool.getStatus());
                         selectedVds = tempRefObject2.argvalue;
                         spmStatus = tempRefObject3.argvalue;
                     } else {


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37741911c8e22f7534516d3ed8bccca6b311dc92
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to