Bug 1434306 - Can not remove Cinder provider even if the service is not available anymore.
Summary: Can not remove Cinder provider even if the service is not available anymore.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.1.0
Hardware: All
OS: All
medium
medium
Target Milestone: ovirt-4.2.0
: ---
Assignee: Daniel Erez
QA Contact: Natalie Gavrielov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-21 08:56 UTC by Andreas Stolzenberger
Modified: 2019-04-28 10:11 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
A "Force Remove" button has been added to the Administration > Providers screen. Currently, it applies only to volume providers (Cinder). It removes the provider from the database, along with all related entities, such as storage domain, virtual machines, templates, and disks.
Clone Of:
Environment:
Last Closed: 2017-11-22 13:09:44 UTC
oVirt Team: Storage
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:1488 0 normal SHIPPED_LIVE Red Hat Virtualization Manager (ovirt-engine) 4.2 GA 2018-06-07 17:27:12 UTC
oVirt gerrit 80232 0 master MERGED core: add force remove provider support 2017-08-16 14:24:21 UTC
oVirt gerrit 80233 0 master MERGED webadmin: add force remove for Cinder provider 2017-08-16 15:19:35 UTC

Description Andreas Stolzenberger 2017-03-21 08:56:13 UTC
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:

Comment 1 Oved Ourfali 2017-03-22 06:19:02 UTC
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.

Comment 2 Andreas Stolzenberger 2017-08-07 08:09:38 UTC
>> 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.

Comment 3 Yaniv Kaul 2017-08-07 09:23:16 UTC
(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.

Comment 4 Daniel Erez 2017-08-16 14:23:02 UTC
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.

Comment 5 Andreas Stolzenberger 2017-10-16 11:23:06 UTC
> Are you sure you cannot remove the disk?
Yes. 
> I believe we have force remove for
> such entities.
No.

Comment 6 rhev-integ 2017-11-02 13:38:47 UTC
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@redhat.com


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