Maor Lipchuk has uploaded a new change for review. Change subject: core: Remove disk when force remove domain ......................................................................
core: Remove disk when force remove domain When force remove domain or storage pool, the disks and the permissions are left in the DB tables. the proposed fix deletes those disks and permissions from the DB as part of the force remove stored procedure. Change-Id: Ic848c26771822a0c3283d6184a54ed9ea229a9cd Signed-off-by: Maor Lipchuk <mlipc...@redhat.com> --- M packaging/dbscripts/storages_sp.sql 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/53/18153/1 diff --git a/packaging/dbscripts/storages_sp.sql b/packaging/dbscripts/storages_sp.sql index 108aa34..44bbf9b 100644 --- a/packaging/dbscripts/storages_sp.sql +++ b/packaging/dbscripts/storages_sp.sql @@ -589,6 +589,10 @@ where entity_type = 'TEMPLATE' and storage_id = v_storage_domain_id; END; + delete FROM permissions WHERE object_id in (select image_group_id FROM all_disks WHERE storage_id = v_storage_domain_id::text); + + delete FROM base_disks WHERE disk_id in (select image_group_id FROM all_disks WHERE storage_id = v_storage_domain_id::text); + delete FROM image_storage_domain_map where storage_domain_id = v_storage_domain_id; delete FROM permissions where object_id in (select vm_id as vm_guid from vm_images_view -- To view, visit http://gerrit.ovirt.org/18153 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic848c26771822a0c3283d6184a54ed9ea229a9cd Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches