Red Hat Bugzilla – Bug 901531
Deleting one gluster volume from gluster cli triggers deletion of all volumes in engine
Last modified: 2013-07-25 16:47:55 EDT
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!!
Modify all calls to fnSplitterUuid present in gluster_volumes_sp.sql to use "*" instead of "ID"