ofri masad has uploaded a new change for review.

Change subject: core: Fix quota calculation for floating disks
......................................................................

core: Fix quota calculation for floating disks

Disk which are not connected to a VM are not counted when calculating
storage quota.

The DB script was updated to include also disks which are not connected
to a VM.

Change-Id: I0da0a2535897076c4512384e65c0aea5ce28a0df
Bug-Url: https://bugzilla.redhat.com/913408
Signed-off-by: Ofri Masad <oma...@redhat.com>
---
M backend/manager/dbscripts/create_functions.sql
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/69/12269/1

diff --git a/backend/manager/dbscripts/create_functions.sql 
b/backend/manager/dbscripts/create_functions.sql
index 7c030f4..5c4f3b9 100644
--- a/backend/manager/dbscripts/create_functions.sql
+++ b/backend/manager/dbscripts/create_functions.sql
@@ -609,9 +609,7 @@
     SELECT COALESCE(sum(size) / (1024 * 1024 * 1024),0) INTO v_virtual_size
        FROM disk_image_dynamic, images_storage_domain_view
        WHERE image_guid = disk_image_dynamic.image_id
-    AND image_guid in (SELECT image_guid
-                       FROM   images i JOIN vm_device vd ON i.image_group_id = 
vd.device_id
-                       WHERE  active = TRUE)
+    AND image_guid in (SELECT image_guid FROM  images WHERE  active = TRUE)
        AND quota_id = v_quota_id
     AND (v_storage_id = images_storage_domain_view.storage_id or v_storage_id 
IS NULL);
 


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

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

Reply via email to