[PATCH 5/5] backup: Store error message for failed backups

Eric Blake eblake at redhat.com
Thu Apr 23 15:49:18 UTC 2020


On 4/16/20 4:55 AM, Peter Krempa wrote:
> 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

Nice.

> 
> 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=1812827
> 
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---

Reviewed-by: Eric Blake <eblake at redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




More information about the libvir-list mailing list