Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1434306 - Can not remove Cinder provider even if the service is not available anymore.
Can not remove Cinder provider even if the service is not available anymore.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
4.1.0
All All
medium Severity medium
: ovirt-4.2.0
: ---
Assigned To: Daniel Erez
Natalie Gavrielov
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-21 04:56 EDT by Andreas Stolzenberger
Modified: 2018-05-14 12:31 EDT (History)
12 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-11-22 08:09:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 80232 master MERGED core: add force remove provider support 2017-08-16 10:24 EDT
oVirt gerrit 80233 master MERGED webadmin: add force remove for Cinder provider 2017-08-16 11:19 EDT
Red Hat Product Errata RHEA-2018:1488 normal SHIPPED_LIVE Red Hat Virtualization Manager (ovirt-engine) 4.2 GA 2018-06-07 13:27:12 EDT

  None (edit)
Description Andreas Stolzenberger 2017-03-21 04:56:13 EDT
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 02:19:02 EDT
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 04:09:38 EDT
>> 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 05:23:16 EDT
(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 10:23:02 EDT
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 07:23:06 EDT
> 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 09:38:47 EDT
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.