Alissa Bonas has uploaded a new change for review.

Change subject: core: handle  error when iso domain in maitenance
......................................................................

core: handle  error when iso domain in maitenance

The bug started from code inserted in change I9d24c94c.
Currently, when iso domain cannot be accessed for any reason, it's considered a
problematic domain and is mentioned in the event log.
This patch adds a check that if the domain is in maintenance,
it is not written in event log in error because it's expected
it cannot be accessed.

Change-Id: Ide53f42c087ffbc9240cccc033e809ff8117ec8c
Bug-Url: https://bugzilla.redhat.com/902246
Signed-off-by: Alissa Bonas <abo...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/IsoDomainListSyncronizer.java
1 file changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/49/11449/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/IsoDomainListSyncronizer.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/IsoDomainListSyncronizer.java
index 9b07538..5060c8f 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/IsoDomainListSyncronizer.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/IsoDomainListSyncronizer.java
@@ -307,15 +307,17 @@
                         storageDomainId,
                         fileTypeExt,
                         storagePoolId);
+                if(storagePoolIsoMap.getstatus()!= 
StorageDomainStatus.Maintenance)   {
+                       // set a mock repository file meta data with storage 
domain id and storage pool id.
+                    RepoFileMetaData repoFileMetaData = new RepoFileMetaData();
+                    repoFileMetaData.setStoragePoolId(storagePoolId);
+                    repoFileMetaData.setRepoDomainId(storageDomainId);
+                    repoFileMetaData.setFileType(fileTypeExt);
 
-                // set a mock repository file meta data with storage domain id 
and storage pool id.
-                RepoFileMetaData repoFileMetaData = new RepoFileMetaData();
-                repoFileMetaData.setStoragePoolId(storagePoolId);
-                repoFileMetaData.setRepoDomainId(storageDomainId);
-                repoFileMetaData.setFileType(fileTypeExt);
+                    // Add the repository file to the list of problematic Iso 
domains.
+                    tempProblematicRepoFileList.add(repoFileMetaData);
+                }
 
-                // Add the repository file to the list of problematic Iso 
domains.
-                tempProblematicRepoFileList.add(repoFileMetaData);
             }
         }
 


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

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

Reply via email to