[pve-devel] [RFC qemu-server 15/16] sync_disks: log output of storage_migrate

Fabian Ebner f.ebner at proxmox.com
Wed Jan 29 14:30:13 CET 2020


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

Not sure about this one. On the one hand it adds even more to the
migration logs, which are already rather long. On the other hand it
might contain useful information.

 PVE/QemuMigrate.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 702fda0..af1cf01 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -480,8 +480,11 @@ sub sync_disks {
 		# JSONSchema and get_bandwidth_limit use kbps - storage_migrate bps
 		$bwlimit = $bwlimit * 1024 if defined($bwlimit);
 
+		my $logfunc = sub {
+		    $self->log('info', $_[0]);
+		};
 		my $new_volid = PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $targetsid,
-							      undef, undef, undef, $bwlimit, $insecure, $with_snapshots);
+							      undef, undef, undef, $bwlimit, $insecure, $with_snapshots, $logfunc);
 
 		$self->{volume_map}->{$volid} = $new_volid if $volid ne $new_volid;
 		$self->log('info', "volume '$volid' is '$new_volid' on the target\n");
-- 
2.20.1





More information about the pve-devel mailing list