[pve-devel] [PATCH common 2/3] AbstractMigrate: remove unused rsync and scp remainders

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jan 20 16:13:12 CET 2017


We have no call using rsync_cmd or scp_cmd here or any child class.
The only part where rsync is used is in the
PVE::Storage::storage_migrate call, but here both the command and the
RSYNC_RSH environment variable gets assembled there locally, so clean
this up here.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 src/PVE/AbstractMigrate.pm | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/src/PVE/AbstractMigrate.pm b/src/PVE/AbstractMigrate.pm
index 140b479..772444a 100644
--- a/src/PVE/AbstractMigrate.pm
+++ b/src/PVE/AbstractMigrate.pm
@@ -127,10 +127,6 @@ my $eval_int = sub {
 
 my @ssh_opts = ('-o', 'BatchMode=yes');
 my @ssh_cmd = ('/usr/bin/ssh', @ssh_opts);
-my @scp_cmd = ('/usr/bin/scp', @ssh_opts);
-my @rsync_opts = ('-aHAX', '--delete', '--numeric-ids');
-my @rsync_cmd = ('/usr/bin/rsync', @rsync_opts);
-
 sub migrate {
     my ($class, $node, $nodeip, $vmid, $opts) = @_;
 
@@ -142,24 +138,18 @@ sub migrate {
 	vmid => $vmid,
 	node => $node,
 	nodeip => $nodeip,
-	rsync_cmd => [ @rsync_cmd ],
 	rem_ssh => [ @ssh_cmd, "root\@$nodeip" ],
-	scp_cmd => [ @scp_cmd ],
     };
 
     $self = bless $self, $class;
 
     my $starttime = time();
 
-    local $ENV{RSYNC_RSH} = join(' ', @ssh_cmd);
-
     local $SIG{INT} = $SIG{TERM} = $SIG{QUIT} = $SIG{HUP} = $SIG{PIPE} = sub {
 	$self->log('err', "received interrupt - delayed");
 	$self->{delayed_interrupt} = 1;
     };
 
-    local $ENV{RSYNC_RSH} = join(' ', @ssh_cmd);
-    
     # lock container during migration
     eval { $self->lock_vm($self->{vmid}, sub {
 
-- 
2.1.4





More information about the pve-devel mailing list