[pve-devel] [PATCH pve-guest-common] Add logfunc in storage_migration.

Wolfgang Link w.link at proxmox.com
Tue Oct 10 09:43:51 CEST 2017


This will redirect export and import output to the correct log, instead of paring it into the syslog.
---
 PVE/Replication.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/PVE/Replication.pm b/PVE/Replication.pm
index e53928e..c25ed44 100644
--- a/PVE/Replication.pm
+++ b/PVE/Replication.pm
@@ -146,13 +146,13 @@ sub prepare {
 }
 
 sub replicate_volume {
-    my ($ssh_info, $storecfg, $volid, $base_snapshot, $sync_snapname, $rate, $insecure) = @_;
+    my ($ssh_info, $storecfg, $volid, $base_snapshot, $sync_snapname, $rate, $insecure, $logfunc) = @_;
 
     my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid);
 
     my $ratelimit_bps = int(1000000*$rate) if $rate;
     PVE::Storage::storage_migrate($storecfg, $volid, $ssh_info, $storeid, $volname,
-				  $base_snapshot, $sync_snapname, $ratelimit_bps, $insecure, 1);
+				  $base_snapshot, $sync_snapname, $ratelimit_bps, $insecure, 1, $logfunc);
 }
 
 
@@ -281,7 +281,7 @@ sub replicate {
 		$logfunc->("full sync '$volid' ($sync_snapname)");
 	    }
 
-	    replicate_volume($ssh_info, $storecfg, $volid, $base_snapname, $sync_snapname, $rate, $insecure);
+	    replicate_volume($ssh_info, $storecfg, $volid, $base_snapname, $sync_snapname, $rate, $insecure, $logfunc);
 	}
     };
     $err = $@;
-- 
2.11.0





More information about the pve-devel mailing list