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

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Sep 12 14:30:00 CEST 2017


On Thu, Sep 07, 2017 at 10:00:07AM +0200, Emmanuel Kasper wrote:
> any feedback on this ?
> cancelling an action because it has been cancelled it not such an
> helpful  error message ;)

Wouldn't this result in:
drive-scsi0: Cancelling block job
2017-07-31 17:51:44 ERROR: online migrate failure - mirroring error: drive-scsi0: lost track of mirroring job (...)

Doesn't look much better IMO? Isn't that more confusing?

> On 08/02/2017 01:28 PM, Emmanuel Kasper wrote:
> > 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};
> > 




More information about the pve-devel mailing list