[pve-devel] [PATCH qemu-server] Fix misleading error message when qmp fails to report a query-block-jobs

Emmanuel Kasper e.kasper at proxmox.com
Wed Aug 2 13:28:29 CEST 2017


Currently when qmp fails to report a query-block-jobs,
we exit with the following log:

drive-scsi0: transferred: 2950692864 bytes remaining: 3491758080 bytes total: 6442450944 bytes progression: 45.80 % busy: 1 ready: 0
drive-scsi0: transferred: 2950692864 bytes remaining: 3491758080 bytes total: 6442450944 bytes progression: 45.80 % busy: 1 ready: 0
drive-scsi0: transferred: 2950692864 bytes remaining: 3491758080 bytes total: 6442450944 bytes progression: 45.80 % busy: 1 ready: 0
drive-scsi0: transferred: 2950692864 bytes remaining: 3491758080 bytes total: 6442450944 bytes progression: 45.80 % busy: 1 ready: 0
drive-scsi0: transferred: 2950692864 bytes remaining: 3491758080 bytes total: 6442450944 bytes progression: 45.80 % busy: 1 ready: 0
drive-scsi0: Cancelling block job
drive-scsi0: Done.
2017-07-31 17:51:44 ERROR: online migrate failure - mirroring error: drive-scsi0: mirroring has been cancelled
2017-07-31 17:51:44 aborting phase 2 - cleanup resources
2017-07-31 17:51:44 migrate_cancel
2017-07-31 17:51:53 ERROR: command '/usr/bin/ssh -o 'BatchMode=yes' -o 'HostKeyAlias=pve4' root at 192.168.16.75 pvesm free pvetank:vm-600-disk-3' failed: exit code 1

'Cancelling block job' comes from the cleanup, but the 'mirroring has been cancelled'
comes when no job status are returned vm_mon_cmd($vmid, "query-block-jobs")
---
 PVE/QemuServer.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 1f34101..b8b3796 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -6051,7 +6051,8 @@ sub qemu_drive_mirror_monitor {
 		    next;
 		}
 
-		die "$job: mirroring has been cancelled\n" if !defined($running_mirror_jobs->{$job});
+		die "$job: lost track of mirroring job while waiting for ready status\n"
+		    if !defined($running_mirror_jobs->{$job});
 
 		my $busy = $running_mirror_jobs->{$job}->{busy};
 		my $ready = $running_mirror_jobs->{$job}->{ready};
-- 
2.11.0





More information about the pve-devel mailing list