Bug 633697

Summary: virsh domjobabort displays error information for aborting domain save job
Product: Red Hat Enterprise Linux 6 Reporter: Alex Jia <ajia>
Component: libvirtAssignee: Osier Yang <jyang>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: dallan, eblake, llim, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-16 06:29:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alex Jia 2010-09-14 09:27:52 UTC
Description of problem:
virsh domjobabort displays error information for aborting domain save job, in fact, domjobinfo and domjobabort operations support migrate and save job, however, libvirt source codes exist hard code for migration in libvirt-0.8.4 tar package:

 ......

 5039 static int
 5040 qemuDomainWaitForMigrationComplete(struct qemud_driver *driver, virDomainObjPtr vm)
 5041 {
 ......

 5150         case QEMU_MONITOR_MIGRATION_STATUS_CANCELLED:
 5151             priv->jobInfo.type = VIR_DOMAIN_JOB_CANCELLED;
 5152             qemuReportError(VIR_ERR_OPERATION_FAILED,
 5153                             "%s", _("Migration was cancelled by client"));
 5154             break;
 5155         }
 ......


Whether we may add a QEMU_MONITOR_SAVE_STATUS_CANCELLED, and then:

          case QEMU_MONITOR_SAVE_STATUS_CANCELLED:
              priv->jobInfo.type = VIR_DOMAIN_JOB_CANCELLED;
              qemuReportError(VIR_ERR_OPERATION_FAILED,
                              "%s", _("Saving was cancelled by client"));
              break;
          }

or giving variable to for Migration and Saving. 
  
Version-Release number of selected component (if applicable):
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.0 (Santiago)

# rpm -q libvirt
libvirt-0.8.1-27.el6.x86_64


How reproducible:
always

Steps to Reproduce:
1. open the first terminal and run virsh save example example.sav
2. open the second terminal and run virsh domjobabort example
  
Actual results:
# virsh domjobabort example

# virsh save example example.sav
error: Failed to save domain example to example.sav
error: operation failed: Migration was cancelled by client


Expected results:
correctly display

Additional info:
libvirt-0.8.4.tar.gz

Comment 2 Osier Yang 2010-11-16 06:29:02 UTC

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