Bug 1298134 - v2v: No import rollback when deleting source VM during import.
Summary: v2v: No import rollback when deleting source VM during import.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 3.6.1
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ovirt-3.6.6
: 3.6.6
Assignee: Shahar Havivi
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-13 10:24 UTC by Nisim Simsolo
Modified: 2016-05-30 10:53 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-30 10:53:34 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-3.6.z+
mgoldboi: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)
engine log (24.91 KB, application/x-gzip)
2016-01-13 10:27 UTC, Nisim Simsolo
no flags Details
vdsm log (772.63 KB, application/x-gzip)
2016-01-13 10:27 UTC, Nisim Simsolo
no flags Details
VMware VMs (2.04 KB, text/plain)
2016-02-02 14:01 UTC, Nisim Simsolo
no flags Details
host processes (50.35 KB, text/plain)
2016-02-02 14:03 UTC, Nisim Simsolo
no flags Details
getVdsStats (8.80 KB, text/plain)
2016-02-02 14:05 UTC, Nisim Simsolo
no flags Details
new vdsm.log (724.42 KB, application/x-gzip)
2016-02-02 14:06 UTC, Nisim Simsolo
no flags Details
new engine.log (113.55 KB, application/x-gzip)
2016-02-02 14:07 UTC, Nisim Simsolo
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 55477 0 master MERGED Handle closed stream when virt-v2v fails 2016-03-31 16:16:52 UTC
oVirt gerrit 55607 0 ovirt-3.6 MERGED Handle closed stream when virt-v2v fails 2016-04-04 06:57:53 UTC

Description Nisim Simsolo 2016-01-13 10:24:24 UTC
Description of problem:
- When deleting source VM during import, the import progress get stuck in webadmin.
- Observing VdsStats shows that v2v job is still running.
- Observing host processes shows that there are no v2v processes.

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

How reproducible:
Consistently. not dependent in import progress phase (initializing, copying etc.). 

Steps to Reproduce:
1. Import VM from VMware environment.
2. During import, delete VMware VM.
3.

Actual results:
Import process get stuck without rolling back.

Expected results:
VM conversion should be canceled with rollback. 

Additional info:
vdsm and engine log attached.
Import started at 2016-01-13 09:02:10,873 (engine.log)

Comment 1 Nisim Simsolo 2016-01-13 10:27:06 UTC
Created attachment 1114355 [details]
engine log

Comment 2 Nisim Simsolo 2016-01-13 10:27:32 UTC
Created attachment 1114356 [details]
vdsm log

Comment 3 Michal Skrivanek 2016-01-29 13:57:25 UTC
Please add logs/proof that on host v2v process was no longer running; or v2v logs.

Looking at vdsm logs there is no indication about anything - Shahar, are you sure when v2v dies it is reported back to vdsm correctly?

Comment 4 Shahar Havivi 2016-01-31 08:03:08 UTC
(In reply to Michal Skrivanek from comment #3)
> Please add logs/proof that on host v2v process was no longer running; or v2v
> logs.
> 
> Looking at vdsm logs there is no indication about anything - Shahar, are you
> sure when v2v dies it is reported back to vdsm correctly?
Yes,
as a test I started to import and stop the engine (for not rolling back and clear the job) killed virt-v2v and the stats show:
        v2vJobs = {'423c38b0-37f6-4d1b-da17-bd1d55fe296c': {'description': "Job '423c38b0-37f6-4d1b-da17-bd1d55fe296c' process failed exit-code: -9, stderr: ",
                                                            'progress': 0,
                                                            'status': 'error'}}

Comment 5 Michal Skrivanek 2016-02-02 11:16:33 UTC
so, that would be an indication that v2v didn't die, right
(adding back needinfo on nisim)

Comment 6 Nisim Simsolo 2016-02-02 13:51:43 UTC
I reproduced it again.. 
when deleting source VM during rhevm "copying disk" phase, the import get stuck in this phase forever.
as for the jobs and processes:
v2v job is still running (see getVdsStats.txt attached)
v2v process is also running [virt-v2v] <defunct> (see host_process.txt attached)
Also, see vmware_vms.txt for existing vmware VMs. the source VM deleted name is RHEL7_test.
vdsm and engine log also attached.

Another thing important to mention, when deleting source VM during initialize phase, import progress is rolled back as expected.

Comment 7 Nisim Simsolo 2016-02-02 14:01:30 UTC
Created attachment 1120441 [details]
VMware VMs

Comment 8 Nisim Simsolo 2016-02-02 14:03:27 UTC
Created attachment 1120442 [details]
host processes

Comment 9 Nisim Simsolo 2016-02-02 14:05:00 UTC
Created attachment 1120443 [details]
getVdsStats

Comment 10 Nisim Simsolo 2016-02-02 14:06:22 UTC
Created attachment 1120444 [details]
new vdsm.log

Comment 11 Nisim Simsolo 2016-02-02 14:07:18 UTC
Created attachment 1120445 [details]
new engine.log

Comment 12 Nisim Simsolo 2016-05-10 13:01:34 UTC
Verified. 
rhevm-3.6.6.2-0.1.el6
qemu-kvm-rhev-2.3.0-31.el7_2.10.x86_64
vdsm-4.17.28-0.el7ev.noarch
sanlock-3.2.4-2.el7_2.x86_64
libvirt-client-1.2.17-13.el7_2.4.x86_64

Verification scenario:
1. Import VM from VMware.
2. During "initializing" phase, delete source VM and verify ConvertVmCallback started, VM deleted from webadmin and its disks were deleted also.
3. Import another VM from VMware.
4. During "copying" phase, delete source VM and verify ConvertVmCallback started, VM deleted from webadmin and its disks were deleted also.


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