Bug 875770 - libvirt: cancel migration is sent but migration continues
Summary: libvirt: cancel migration is sent but migration continues
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
Depends On: 873792
TreeView+ depends on / blocked
Reported: 2012-11-12 14:52 UTC by Chris Pelland
Modified: 2012-11-22 09:40 UTC (History)
15 users (show)

Fixed In Version: libvirt-0.9.10-21.el6_3.6
Doc Type: Bug Fix
Doc Text:
Cause: Libvirt allows users to cancel ongoing migration. Internally it was implemented by sending 'migrate_cancel' command to qemu. However, from libvirt POV migration has several phases. The first is begin, where the preparation work takes place (e.g. the connection to destination is established, the domain XML is sent to destination, ABI stability is checked, etc.). The very next phase is perform, where 'migrate' command is issued and libvirt waits for qemu to migrate. However, with bad timing it was possible to issue 'migrate_cancel' prior to 'migrate' command. Consequence: This inconvenience led to situation where migration wasn't cancelled even though user requested it. Fix: Correct fix was to check when translating to perform phase if user requested migration cancellation. That is, virDomainAbortJob() API not just issue 'migrate_cancel' but sets a flag as well. This flag is checked just before issuing 'migrate' command and may lead to not issuing the command at all (if user requested cancellation at prepare phase). Result: Migration can be cancelled at prepare phase as well.
Clone Of:
Last Closed: 2012-11-22 09:40:28 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:1484 0 normal SHIPPED_LIVE libvirt bug fix update 2012-11-22 14:39:12 UTC

Description Chris Pelland 2012-11-12 14:52:47 UTC
This bug has been copied from bug #873792 and has been proposed
to be backported to 6.3 z-stream (EUS).

Comment 6 weizhang 2012-11-14 12:17:57 UTC
Verify pass on


# virsh migrate --live vr-rhel6u3-x86_64-kvm qemu+ssh:// --verbose & usleep 500000; virsh domjobabort vr-rhel6u3-x86_64-kvm

error: operation aborted: migration out: canceled by client

Comment 8 errata-xmlrpc 2012-11-22 09:40:28 UTC
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.


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