Bug 1396969 - Diskless VM can be registered after re-attach storage domain to data-center
Summary: Diskless VM can be registered after re-attach storage domain to data-center
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.0.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: ---
: ---
Assignee: Maor
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-21 10:05 UTC by Eyal Shenitzky
Modified: 2022-06-30 13:02 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-27 15:34:20 UTC
oVirt Team: Storage
sbonazzo: ovirt-4.1-
sbonazzo: blocker-


Attachments (Terms of Use)
engine logs (484.62 KB, application/x-bzip)
2016-11-21 10:05 UTC, Eyal Shenitzky
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-46850 0 None None None 2022-06-30 13:02:48 UTC

Description Eyal Shenitzky 2016-11-21 10:05:40 UTC
Created attachment 1222354 [details]
engine logs

Description of problem:

In environment with more than one storage domain, and diskless VM.
After detaching one storage domain from the environment, the VM remain in the data-center but after the storage-domain attached back, the VM can be registered from it.

Version-Release number of selected component (if applicable):
Engine - 4.0.6-0.1.el7ev

How reproducible:
100%

Steps to Reproduce:
1. Create 2 storage-domains
2. Create a VM without disks
3. Detach one of the storage-domains
4. Attach the storage-domain from step 3 back to the data-center
5. Try to import the VM from step 2.
 
Actual results:
Failed to import the VM back since it's already exist

Expected results:
VM should not appear as available for registration. 

Additional info:
Engine logs attached

Comment 1 Maor 2016-12-25 00:00:44 UTC
Basically, we don't have any obligation not to show unregistered entities in a storage domain even if they are already registered in the system.
Looking at the code it looks like this was always worked like this (even with VMs containing disks on separate storage domains).
because of that reason I don't think it is a bug, although since you marked it as a regression I'm interesting to see what was the behavior before and when it was changed

Comment 2 Red Hat Bugzilla Rules Engine 2016-12-25 00:00:51 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 3 Maor 2016-12-25 14:25:29 UTC
(In reply to Maor from comment #1)
> Basically, we don't have any obligation not to show unregistered entities in
> a storage domain even if they are already registered in the system.
> Looking at the code it looks like this was always worked like this (even
> with VMs containing disks on separate storage domains).
> because of that reason I don't think it is a bug, although since you marked
> it as a regression I'm interesting to see what was the behavior before and
> when it was changed

I think that we can remove this automatic test since I don't see any reason to filter out unregistered diskless vms.
The behavior should be consistent and unregistered entities should still get presented even if they are already registered in the engine.
The validation, how ever should block the entity from being registered twice.

Allon, is there any other reason you think we should filter out unregistered entities, or can we close this bug?

Comment 4 Yaniv Lavi 2016-12-27 15:34:20 UTC
As we consistent with unregistered vms behavior (diskless or not) and we don't have any RFE requesting filtering. I'm closing this won't fix.

Comment 5 Raz Tamir 2016-12-27 15:48:02 UTC
Eyal,
I remember you open this because the documentation says this should not be allowed.  Please refer to the place it is written so the documentation will change accordingly

Comment 6 Eyal Shenitzky 2017-01-04 07:26:18 UTC
http://www.ovirt.org/develop/release-management/features/engine/importunregisteredentities/ : 

 - On detach of Storage Domain the VMs/Templates related to the Storage Domain should be deleted from the engine, but their data will be converted to an XML data which will be preserved in a DB table called unregistered_ovf_of_entities, and will still be part of the OVF disk contained in the Storage Domain.

-> add that an exception about diskless VM, Stay at the engine after storage domain detached.

I didn't find any reference to VM without disks in the documentations.


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