Bug 1297865

Summary: v2v: Remove VM disk option should be blocked by webadmin during import progress (locked VM).
Product: [oVirt] ovirt-engine Reporter: Nisim Simsolo <nsimsolo>
Component: BLL.VirtAssignee: Michal Skrivanek <michal.skrivanek>
Status: CLOSED NOTABUG QA Contact: Nisim Simsolo <nsimsolo>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.6.1CC: bugs, nsimsolo
Target Milestone: ---Flags: rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-02 10:24:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
engine.log
none
vdsm.log none

Description Nisim Simsolo 2016-01-12 16:32:29 UTC
Description of problem:
When importing VM from VMware, it is possible to remove its disk during import progress (disk also removed from database). 
After disk removed, the import process continues with no exception/rollback.
After import progress completed, VM can be run, but without any disk.
This issue is true for NFS and block device target.

Version-Release number of selected component (if applicable):
rhevm-3.6.2-0.1.el6
qemu-kvm-rhev-2.3.0-31.el7_2.4.x86_64
vdsm-4.17.15-0.el7ev.noarch
sanlock-3.2.4-1.el7.x86_64
libvirt-client-1.2.17-13.el7_2.2.x86_64

How reproducible:
consistently, regardless to import phase and storage type on source/destination.

Steps to Reproduce:
1. Import VM with one disk from VMware environment.
2. Wait for import to start.
3. From virtual machines tab > imported VM > disks tab, remove VM disk. 

Actual results:
Disk removed and import process is continuing with no exception/rollback.

Expected results:
Remove disk option should be blocked during import VM progress (locked VM).

Additional info:
vdsm and engine logs attached.
disk removed at: engine - 2016-01-12 15:44:56,396
vdsm: 2016-01-12 17:44:56,471

Comment 1 Nisim Simsolo 2016-01-12 16:33:46 UTC
Created attachment 1113997 [details]
engine.log

Comment 2 Nisim Simsolo 2016-01-12 16:34:37 UTC
Created attachment 1114011 [details]
vdsm.log

Comment 3 Michal Skrivanek 2016-01-29 13:51:41 UTC
you removed the disk and then when conversion finishes you don't have that disk...so...what's the problem?:)

Comment 4 Nisim Simsolo 2016-01-31 13:24:21 UTC
Disk copying phase continue (in webadmin events and in  VM tab --> import progress bar) although the destination disk has been removed.
This behavior is not reasonable and can lead the user to be skeptical about the disk removal (is it actually removed from storage or just removed from webadmin?) because it looks like the copying disks phase is still in progress and it take some minutes till the import progress bar advanced to the next phase.

Comment 5 Michal Skrivanek 2016-02-02 10:24:19 UTC
(In reply to Nisim Simsolo from comment #4)
> Disk copying phase continue (in webadmin events and in  VM tab --> import
> progress bar) although the destination disk has been removed.
> This behavior is not reasonable and can lead the user to be skeptical about
> the disk removal (is it actually removed from storage or just removed from
> webadmin?) because it looks like the copying disks phase is still in
> progress and it take some minutes till the import progress bar advanced to
> the next phase.

yes, but it's consistent with file removal when someone is writing to it. So at the end of conversion there will be no data and the disk space is freed. You can also cancel the v2v job any time so don't really have to wait