Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 910706

Summary: vdsm: vm with preallocated disk is stuck in migrateing from forever when we try to migrate it to a different host after suspend -> resume
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: vdsmAssignee: Vinzenz Feenstra [evilissimo] <vfeenstr>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1.3CC: abaron, acathrow, bazulay, hateya, iheim, lpeer, michal.skrivanek, ykaul
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-11 10:53:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 894723, 913226, 913242    
Bug Blocks:    
Attachments:
Description Flags
logs none

Description Dafna Ron 2013-02-13 10:47:50 UTC
Created attachment 696758 [details]
logs

Description of problem:

I ran a vm with preallocated disk -> suspended the vm -> resumed -> tried to migrate it to a second host. 
the vm is stuck in migrating from forever. 

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

vdsm-4.10.2-1.3.el6.x86_64
libvirt-0.10.2-18.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.348.el6.x86_64
qemu-img-rhev-0.12.1.2-2.348.el6.x86_64
sanlock-2.6-2.el6.x86_64

How reproducible:

100%

Steps to Reproduce:
1. create an iscsi pool with 1 vm with preallocated disk (My disk was 10GB)
2. run the vm
3. suspend -> resume the vm
4. try to migrate it to a second host
  
Actual results:

we should be able to migate the vm 

Expected results:

vm is stuck in migratuing from forever 

Additional info:

vdsm logs show that the migration compeleted but for some reason we are still trying to fail the migration on timeout:

Thread-144865::INFO::2013-02-13 10:13:49,658::libvirtvm::411::vm.Vm::(run) vmId=`ba5b5f21-2370-47b8-a95d-c282873fa1ba`::Migration Progress: 300 seconds elapsed, 100% of data processed, 100% of mem processed

Thread-60531::ERROR::2013-02-13 10:14:14,001::utils::416::vm.Vm::(collect) vmId=`a30fcafd-aa26-475a-ac0e-e9d073287a37`::Stats function failed: <AdvancedStatsFunction _highWrite at 0x2265810>
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/vdsm/utils.py", line 412, in collect
    statsFunction()
  File "/usr/lib64/python2.6/site-packages/vdsm/utils.py", line 287, in __call__
    retValue = self._function(*args, **kwargs)
  File "/usr/share/vdsm/libvirtvm.py", line 109, in _highWrite
    self._vm._dom.blockInfo(vmDrive.path, 0)
  File "/usr/share/vdsm/libvirtvm.py", line 523, in f
    raise toe
TimeoutError: Timed out during operation: cannot acquire state change lock

libvirt shows the vm as running in src host while shut off in dst and vdsm will show the vm as migrating in src and paused in dest.

src: 

[root@cougar02 ~]# virsh -r list
 Id    Name                           State
----------------------------------------------------
 20    VM                             running

[root@cougar02 ~]# vdsClient -s 0 list table
ba5b5f21-2370-47b8-a95d-c282873fa1ba  15233  VM                   Migration Source

dst: 

[root@cougar01 yum.repos.d]# virsh -r list
 Id    Name                           State
----------------------------------------------------
12    VM                             shut off

[root@cougar01 yum.repos.d]# vdsClient -s 0 list table
ba5b5f21-2370-47b8-a95d-c282873fa1ba  18338  VM                   Paused

Comment 1 Michal Skrivanek 2013-02-18 16:17:33 UTC
most likely a consequence of 894723, libvirt is supposed to fix

Comment 2 Michal Skrivanek 2013-03-11 10:53:34 UTC

*** This bug has been marked as a duplicate of bug 894723 ***