[pve-devel] [PATCH storage 1/3] migrate: use the correct IP with rsync

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Jun 6 10:04:01 CEST 2017


---
 PVE/Storage.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index cfd7b2c..04682bb 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -540,8 +540,8 @@ sub storage_migrate {
 
     my $target_volid = "${target_storeid}:${target_volname}";
 
-    my $target_host = $target_sshinfo->{name};
-    my $errstr = "unable to migrate '$volid' to '${target_volid}' on host '$target_host'";
+    my $target_ip = $target_sshinfo->{ip};
+    my $errstr = "unable to migrate '$volid' to '${target_volid}' on host '$target_sshinfo->{name}'";
 
     my $ssh = PVE::Cluster::ssh_info_to_command($target_sshinfo);
     local $ENV{RSYNC_RSH} = PVE::Tools::cmd2string($ssh);
@@ -598,11 +598,11 @@ sub storage_migrate {
 		    $cmd = ['/usr/bin/rsync', '--progress', '-X', '-A', '--numeric-ids',
 			    '-aH', '--delete', '--no-whole-file', '--inplace',
 			    '--one-file-system', @bwlimit,
-			    "$src/", "[root\@${target_host}]:$dst"];
+			    "$src/", "[root\@${target_ip}]:$dst"];
 		} else {
 		    $cmd = ['/usr/bin/rsync', '--progress', '--sparse', '--whole-file',
 			    @bwlimit,
-			    $src, "[root\@${target_host}]:$dst"];
+			    $src, "[root\@${target_ip}]:$dst"];
 		}
 
 		my $percent = -1;
-- 
2.11.0





More information about the pve-devel mailing list