Allon Mureinik has uploaded a new change for review.

Change subject: core: ImagesHandler.checkDiskImages with multi-SDs
......................................................................

core: ImagesHandler.checkDiskImages with multi-SDs

In the current implementation, checkDiskImages takes the first storage
domain for each disk it checks.
This behaviour is obviously problematic for images which exist on
multiple storage domains, as the check could succeed or fail based solely
on the order the domains appear in the disk's data member.

This patch changes the logic to accumulate ALL of the domains of all the
images, for a more meaningful behaviour.

Looking forward, this change will enable using checkDiskImages for
template disks correctly, even though all the current use cases are VM
usecases, which implies a single domain per disk. Thus, this patch
preserves the current behaviour, but allows additional future usecases.

Change-Id: I61b729bdcbd3001d371fb58a6358172b07be94f4
Signed-off-by: Allon Mureinik <amure...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/14/11414/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
index df786e1..363a475 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
@@ -523,7 +523,7 @@
                 domainsIds.add(storageDomainId);
             } else {
                 for (DiskImage image : images) {
-                    domainsIds.add(image.getstorage_ids().get(0));
+                    domainsIds.addAll(image.getstorage_ids());
                 }
             }
             for (Guid domainId : domainsIds) {


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

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

Reply via email to