Bug 982527 - Disk entries remain in database after deleting the datacenter
Disk entries remain in database after deleting the datacenter
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.2.0
Unspecified Unspecified
medium Severity high
: ---
: 3.3.0
Assigned To: Maor
Aharon Canan
storage
:
Depends On:
Blocks: 892642 1019461
  Show dependency treegraph
 
Reported: 2013-07-09 04:58 EDT by Kevein Liu
Modified: 2016-02-10 14:10 EST (History)
13 users (show)

See Also:
Fixed In Version: is12
Doc Type: Bug Fix
Doc Text:
Previously, certain disks and permissions would be left in the database after forced removal of a storage domain or storage pool, resulting in partial titles remaining visible in the Permissions tab of the details pane for the User tab. With this update, the forced removal procedure has been updated to include the deletion of all disks and permissions from the database.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-21 12:33:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
amureini: Triaged+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 18153 None None None Never

  None (edit)
Description Kevein Liu 2013-07-09 04:58:01 EDT
Description of problem:
After deleting the datacenter, all the correlate disks, VMs, templates are all gone. But the disk entries are still in table "base_disks".

Version-Release number of selected component (if applicable):
* rhevm-3.2.0-11.33.el6ev.noarch

How reproducible:
100% reproduce.

Steps to Reproduce:
1. Create a datacenter and initialize it.
2. Create several virtual machines with disks.(no need for installing a OS on them).
3. Delete the datacenter
4. In database, we'll see the disk entries of the deleted datacenter. 
  engine# SELECT * from base_disks ; 

Actual results:
See the disk entries of the deleted datacenter are in the database(table base_disks).

Expected results:
The correlate disk entries should be deleted as well.

Additional info:
Comment 2 Kevein Liu 2013-08-05 04:28:30 EDT
Hi Team,

As it's already one month since the bug was opened, is there any update here?
Customer is looking forward on our actions.
Thanks a lot!

Cheers,
Kevein
Comment 3 Maor 2013-08-14 05:55:56 EDT
This bug reproduces on NFS and ISCSI.
to reproduce the scenario we should delete to storage pool with force remove.

The appropriate fix should be to add a foreign key with cascade delete when removing the storage pool
Comment 4 Maor 2013-08-21 04:50:03 EDT
Fixing the script of force remove.
take in notice, the fix only reference the force delete operation, if there are already orphaned entries in the DB, there should be deleted manually.
Comment 5 Aharon Canan 2013-09-09 07:45:33 EDT
verified using is12

verification steps - 
1. Create a datacenter and initialize it.
2. Create several virtual machines with disks.(no need for installing a OS on them).
3. Delete the datacenter
4. In database, we'll see the disk entries of the deleted datacenter. 
  engine# SELECT * from base_disks ;
Comment 6 Charlie 2013-11-27 19:26:01 EST
This bug is currently attached to errata RHEA-2013:15231. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.
Comment 7 errata-xmlrpc 2014-01-21 12:33:26 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2014-0038.html

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