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

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Feb 2 16:31:34 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>
---

changes since v1:
* rebased on new guest-common package

 PVE/AbstractMigrate.pm | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/PVE/AbstractMigrate.pm b/PVE/AbstractMigrate.pm
index 140b479..8655d8b 100644
--- a/PVE/AbstractMigrate.pm
+++ b/PVE/AbstractMigrate.pm
@@ -127,9 +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 +139,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