migration: log error from query-migrate upon migration failure

if it is present. Should give more information for some failures and
even if it's not present, that fact helps to narrow things down.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2023-01-11 15:54:27 +01:00 committed by Thomas Lamprecht
parent 30fdf99cff
commit 55d0741197

View File

@ -1271,7 +1271,8 @@ sub phase2 {
}
if ($status eq 'failed' || $status eq 'cancelled') {
$self->log('info', "migration status error: $status");
my $message = $stat->{'error-desc'} ? "$status - $stat->{'error-desc'}" : $status;
$self->log('info', "migration status error: $message");
die "aborting\n"
}