Red Hat Bugzilla – Bug 760149
general error return on migrate after calling abortjob()
Last modified: 2012-06-20 02:37:48 EDT
When calling domain.abortjob() while migration is in progress domain.migrateToURI2() gets an error: VIR_ERR_OPERATION_FAILED, which is too general. In the error description I am getting: "operation failed: migration job: cancelled by client" So in order to know that the job was cancelled I need to parse the error message.
We need to invent a new error code (VIR_ERR_OPERATION_ABORTED) and return that instead.
A new error code for this purpose was introduced by : commit 8fb2aeb662c11e131b42a42245064dbb881659b7 Author: Peter Krempa <pkrempa@redhat.com> Date: Fri Dec 16 14:58:38 2011 +0100 migration: Add more specific error code/message on migration abort A generic error code was returned, if the user aborted a migration job. This made it hard to distinguish between a user requested abort and an error that might have occured. This patch introduces a new error code, which is returned in the specific case of a user abort, while leaving all other failures with their existing code. This makes it easier to distinguish between failure while mirgrating and an user requested abort. The new error code is called VIR_ERR_OPERATION_ABORTED.
Verify Pass on kernel-2.6.32-223.el6.x86_64 libvirt-0.9.9-1.el6.x86_64 qemu-kvm-0.12.1.2-2.213.el6.x86_64 # virsh migrate --live kvm-rhel6u2-x86_64-new qemu+ssh://10.66.83.198/system on other console do # virsh domjobabort kvm-rhel6u2-x86_64-new migration report error error: operation aborted: migration job: canceled by client It shows that the operation is aborted
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: No Documentation needed
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-2012-0748.html