Red Hat Bugzilla – Bug 873792
libvirt: cancel migration is sent but migration continues
Last modified: 2013-02-21 02:26:00 EST
Created attachment 639477 [details] logs Description of problem: I cancelled migration of a vm right after it started and migration continued. Michal looked at the logs and determined that vdsm isued 'migrate_cancel' before libvirt gets to 'migrate' Version-Release number of selected component (if applicable): vdsm-4.9.6-41.0.el6_3.x86_64 libvirt-0.9.10-21.el6_3.5.x86_64 qemu-kvm-rhev-0.12.1.2-2.295.el6_3.5.x86_64 How reproducible: 100% Steps to Reproduce: 1. migrate a vm from one host to a second host 2. cancel migration right at the beginning of the migration 3. Actual results: migration continues Expected results: migration should be cancelled. Additional info: logs
This is race. The first thread (the one that starts migration) sets job and is preparing to issue monitor commands to qemu. However, meanwhile second thread jumps in and since the job is already set, it cancels the job, issue 'migrate_cancel' and quit. Right after the first thread finished preparation and starts the migration (executes 'migrate' on the monitor).
This is also tracked upstream in bug 728904.
Patch proposed upstream: https://www.redhat.com/archives/libvir-list/2012-November/msg00356.html
I can reproduce with # virsh migrate --live vr-rhel6u3-x86_64-kvm qemu+ssh://10.66.84.16/system --verbose & usleep 700000; virsh domjobabort vr-rhel6u3-x86_64-kvm; echo "$?" domjobabort return 0 but migration continued version libvirt-0.10.2-7.el6.x86_64 qemu-kvm-0.12.1.2-2.323.el6.x86_64 kernel-2.6.32-329.el6.x86_64
Moving to POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2012-November/msg00103.html
Verify pass on libvirt-0.10.2-8.el6.x86_64 qemu-kvm-0.12.1.2-2.323.el6.x86_64 kernel-2.6.32-329.el6.x86_64 # virsh migrate --live vr-rhel6u3-x86_64-kvm qemu+ssh://10.66.84.16/system --verbose & usleep 500000; virsh domjobabort vr-rhel6u3-x86_64-kvm error: operation aborted: migration out: canceled by client
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0276.html