Bug 1377784

Summary: [RFE] add list of VMs to warning message by detaching storage from DC, that will be deleted
Product: [oVirt] ovirt-engine Reporter: Lucie Leistnerova <lleistne>
Component: Frontend.WebAdminAssignee: bugs <bugs>
Status: CLOSED WONTFIX QA Contact: Pavel Stehlik <pstehlik>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.0.4CC: bugs, dfediuck, michal.skrivanek, mlipchuk, tnisan, ylavi
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: ylavi: ovirt-future?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-27 13:49:20 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:
Attachments:
Description Flags
engine.log none

Description Lucie Leistnerova 2016-09-20 15:15:53 UTC
Created attachment 1202941 [details]
engine.log

Description of problem:
detaching storage from DC removes all VMs and disks on this storage

Version-Release number of selected component (if applicable):
ovirt-engine-4.0.4.3-0.1.el7ev.noarch

How reproducible: always


Steps to Reproduce:
1. have 2 NFS storages created, one attached and active in DC
2. create VM and new disk for it, VM not running
3. attach to DC the second storage
4. move first storage to maintenance
5. detach first storage from DC

Actual results: VM is removed, disk removed also


Expected results: VM should stay in unregistered state (as mentioned in warning by detaching storage), but I'm not sure what should happen to disk, it maybe should stay in Disks list for next usage with other storage

Comment 1 Michal Skrivanek 2016-09-21 05:46:04 UTC
I beliee it is a correct behavior, they will be readded on add existing storage domain
Tal, is that correct?

Comment 2 Tal Nisan 2016-09-21 07:50:56 UTC
(In reply to Michal Skrivanek from comment #1)
> I beliee it is a correct behavior, they will be readded on add existing
> storage domain
> Tal, is that correct?

Quite sure this is true and will be added on import domain, Maor can you confirm?

Comment 3 Lucie Leistnerova 2016-09-21 08:03:06 UTC
after the Administration Guide:

4.6.4. Detaching a Storage Domain from a Data Center
...
Data, such as virtual machines and templates, remains attached to the storage domain.

but no VMs are shown in main engine list even in the list for the dettached storage and when I attach the storage back to DC, the removed VMs don't appear.

I don't see how this could be the right behavior. 
What exactly means import domain? I have the storage in engine all the time, but is not attached to any DC.

Comment 4 Maor 2016-09-21 09:41:25 UTC
This should be the desired behavior, you can take a look at the import storage domain wiki see [1]:
"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."

[1] https://www.ovirt.org/develop/release-management/features/storage/importstoragedomain/

You can take a look at the following videos :

https://www.youtube.com/watch?v=YbU-DIwN-Wc

Comment 5 Lucie Leistnerova 2016-09-21 10:29:54 UTC
All right, got it.

I suggest to enhance warning message and add list of VMs with information, that they will be deleted from the engine and can be imported again.

Comment 6 Doron Fediuck 2018-05-27 13:49:20 UTC
Closing old RFEs.
If relevant, please re-open and explain why.
As always- patches are welcomed!