Description of problem: Defined external provider (Cinder). Added Cinder Disk. Deinstalled Cinder. -> Cannot remove the RHV config of the Cinder Disk or the Provider itself, after deleting the source Version-Release number of selected component (if applicable): 4.x How reproducible: Always Steps to Reproduce: 1. Add cinder provider, add cinder disk 2. delete cinder (the service, not the provider) 3. try to remove cinder ressources on RHV Actual results: fails to remove nonexisting provider (since a disk is still defined) Disk can't be deleted (nonexistent) -> provider can't be deleted (Chicken? Egg?) Expected results: Option: Force remove Provider & Disk Additional info:
This functionality should be provider specific. If needed, we can do the "wrapping" around the, but makes sense that the first use of that in the code will do it all. Allon, I'm moving to storage, but if you want us to add the infra for that and only you guys implement the provider specific part then let me know.
>> This functionality should be provider specific. This is not the first "undeletable" ressource inside Ovirt because of ressource dependencies -- and it probably won't be the last. Why not implement a generic "Delete this ressource XXX -- I know what I'm doing"-Function for Storage, Networks, Providers, whatever ressource. Maybe implement an additionall "Are you really really sure" Question to that. But as an Ovirt Admin, I'd like to remove whatever I think needs to be removed, no matter what existing, damaged, currently unavailable or nonexisting dependencies are attached to that. Otherwise, you'll fore Ovirt Admins to mess around with the postgress tables directly.
(In reply to Andreas Stolzenberger from comment #2) > >> This functionality should be provider specific. > > This is not the first "undeletable" ressource inside Ovirt because of > ressource dependencies -- and it probably won't be the last. > Why not implement a generic "Delete this ressource XXX -- I know what I'm > doing"-Function for Storage, Networks, Providers, whatever ressource. Maybe > implement an additionall "Are you really really sure" Question to that. But > as an Ovirt Admin, I'd like to remove whatever I think needs to be removed, > no matter what existing, damaged, currently unavailable or nonexisting > dependencies are attached to that. > > Otherwise, you'll fore Ovirt Admins to mess around with the postgress tables > directly. Are you sure you cannot remove the disk? I believe we have force remove for such entities. If we don't, this is the bug. Having 'force remove' without thinking of the consequences WILL cause dangling, zombie objects to remain in the database. This is sometimes worse.
Force remove of disks should be available when the disk is in status Illegal. I.e. removal of a disk in status Illegal is merely a DB operation that deleted the disk from the database. For example, a disk is moved to an Illegal status upon a failure of a storage removal. Then, when trying to remove again, we skip to storage part and just remove it from the database. However, other related entities (such as VMs and Templates) are still kept in the database, which prevent the removal of the provider. The suggested solution is to have a provider force removal which simply invokes the operation of force remove storage domain. I.e. an existing flow that is tested and should be safe.
> Are you sure you cannot remove the disk? Yes. > I believe we have force remove for > such entities. No.
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason: [No relevant external trackers attached] For more info please contact: rhv-devops