• P
    backup: Store error message for failed backups · b37fdfb9
    Peter Krempa 提交于
    If a backup job fails midway it's hard to figure out what happened as
    it's running asynchronous. Use the VIR_DOMAIN_JOB_ERRMSG job statistics
    field to pass through the error from the first failed backup-blockjob
    so that both the consumer of the virDomainGetJobStats and the
    corresponding event can see the error.
    
    event 'job-completed' for domain backup-test:
    	operation: 9
    	time_elapsed: 46
    	disk_total: 104857600
    	disk_processed: 10158080
    	disk_remaining: 94699520
    	success: 0
    	errmsg: No space left on device
    
    virsh domjobinfo backup-test --completed --anystats
    Job type:         Failed
    Operation:        Backup
    Time elapsed:     46           ms
    File processed:   9.688 MiB
    File remaining:   90.312 MiB
    File total:       100.000 MiB
    Error message:    No space left on device
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1812827Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
    Reviewed-by: NEric Blake <eblake@redhat.com>
    b37fdfb9
backup_conf.h 3.7 KB