]> git.ipfire.org Git - thirdparty/libvirt.git/commit
backup: Store error message for failed backups
authorPeter Krempa <pkrempa@redhat.com>
Thu, 16 Apr 2020 09:23:07 +0000 (11:23 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 24 Apr 2020 06:56:57 +0000 (08:56 +0200)
commitb37fdfb9d4ead0a01377837e02ecedee48337c97
treefb5a1357ba497500f1891c075f1b1cbf9be976c4
parent75a66f1076548c240e675976d690835aadb6e79c
backup: Store error message for failed backups

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=1812827

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
src/conf/backup_conf.c
src/conf/backup_conf.h
src/qemu/qemu_backup.c
src/qemu/qemu_backup.h
src/qemu/qemu_blockjob.c
src/qemu/qemu_domain.c