Bug 1733932

Summary: [RFE] add an option to remove unregistered entities from attached storage domain
Product: [oVirt] ovirt-engine Reporter: Eyal Shenitzky <eshenitz>
Component: BLL.StorageAssignee: Eyal Shenitzky <eshenitz>
Status: CLOSED CURRENTRELEASE QA Contact: Ilan Zuckerman <izuckerm>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.2CC: bugs, sgoodman, tnisan
Target Milestone: ovirt-4.4.0Keywords: FutureFeature
Target Release: ---Flags: pm-rhel: ovirt-4.4?
pm-rhel: planning_ack?
pm-rhel: devel_ack+
pm-rhel: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
With this update, you can remove an unregistered entity, such as a virtual machine, a template, or a disk, without importing it into the environment.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-25 06:26:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Images of the remove btn per each tab (template import, vm import, disk import none

Description Eyal Shenitzky 2019-07-29 08:59:34 UTC
Description of problem:

Currently, the user cannot remove an unregistered entity.
The only option is to register the entity to a data center and then remove it which is caused for redundant operations.

The problem is when we have a template with a disk that been copied to several storage domains for e.g on SD1 and SD2.

When detaching SD1 the template will be considered as an unregistered entity on 
SD1 but it will also remain on the data center.

When the user will try to re-attach SD1 to that data center and register the template, he will fail because the template still exists.
So now the user has an unregistered template that he cannot remove or register.



[RFE] add an option to remove unregistered entities from attached storage domain


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Sandro Bonazzola 2020-05-18 14:46:35 UTC
Moved to 4.4.1 not being marked as blocker for 4.4.0 and we are preparing to GA.

Comment 2 Eyal Shenitzky 2020-05-18 18:10:53 UTC
I am surprised that this bug is still on POST, it seems like the system didn't move it to MODIFIED and we missed it.
Re-target to 4.4.0 since all work is done long ago.

Comment 3 Ilan Zuckerman 2020-05-24 10:50:50 UTC
Eyal, please provide clear reproduction steps for this one.
I tried to follow your description on 4.3, but after detaching and re-attaching a storage domain with template disk on it, i can not see any 'unregistered' templates on it. In fact there are no templates at all on it.
I tried to view the templates both manually from UI and with help of rest API. Both are empty.

Comment 4 Eyal Shenitzky 2020-05-24 11:26:58 UTC
Steps to reproduce:

1. Create a DC with 2 storage domains (sd1, sd2)
2. Create a VM with disks on SD1
3. Create a template from the VM in step 2
4. Create a floating disk based on SD1
5. Deactivate SD1
6. Detach SD1 without format it
7. Import SD1 back to the DC
8. Under Storage -> Domains -> SD1 -> import VM/Template/Disk select to remove the unregistered entities.

Comment 5 Ilan Zuckerman 2020-05-24 12:43:22 UTC
Verified on rhv-4.4.1-1

Comment 6 Ilan Zuckerman 2020-05-24 12:45:19 UTC
Created attachment 1691534 [details]
Images of the remove btn per each tab (template import, vm import, disk import

Comment 7 Sandro Bonazzola 2020-05-25 06:26:52 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

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