Bug 901531 - Deleting one gluster volume from gluster cli triggers deletion of all volumes in engine
Summary: Deleting one gluster volume from gluster cli triggers deletion of all volumes...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: unspecified
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 3.2
Assignee: Shubhendu Tripathi
QA Contact:
URL:
Whiteboard: gluster
Depends On:
Blocks: ovirt-3.2-release 901465 903084
TreeView+ depends on / blocked
 
Reported: 2013-01-18 12:09 UTC by Shireesh
Modified: 2013-07-25 20:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 903084 (view as bug list)
Environment:
Last Closed: 2013-07-25 20:47:55 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 11799 0 None None None Never

Description Shireesh 2013-01-18 12:09:22 UTC
Root cause:

Patch http://gerrit.ovirt.org/9825 changed the definition of the SP fnSplitterUuid in such a way that the older call to this SP, that looked like:

select ID from fnSplitterUuid(v_ids)

no longer works, and now needs to be changed to something like:

select * from fnSplitterUuid(v_ids)

While this change was done in most of the *_sp.sql scripts, it was missed out in gluster_volumes_sp.sql

This results in particular severe consequences if you are trying to delete few entries, like it's done in DeleteGlusterVolumesByGuids:

DELETE FROM gluster_volumes 
WHERE id in (select ID from fnSplitterUuid(v_volume_ids));

One may think that this query should fail, but it actually results in deleting all the records from the table!!

Solution:

Modify all calls to fnSplitterUuid present in gluster_volumes_sp.sql to use "*" instead of "ID"


Note You need to log in before you can comment on or make changes to this bug.