]> git.proxmox.com Git - pve-storage.git/commitdiff
use PVE::SSHInfo
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 11 Nov 2019 10:28:15 +0000 (11:28 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 18 Nov 2019 11:03:00 +0000 (12:03 +0100)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/API2/Storage/Content.pm
PVE/Storage.pm

index 9f6ea108ebdf955b31fd1876bca3ec7be62f216e..ce89ec5dccdc595a4618f816079ff3b210483249 100644 (file)
@@ -12,6 +12,7 @@ use PVE::Exception qw(raise_param_exc);
 use PVE::RPCEnvironment;
 use PVE::RESTHandler;
 use PVE::JSONSchema qw(get_standard_option);
+use PVE::SSHInfo;
 
 use base qw(PVE::RESTHandler);
 
@@ -410,7 +411,7 @@ __PACKAGE__->register_method ({
 
            # you need to get this working (fails currently, because storage_migrate() uses
            # ssh to connect to local host (which is not needed
-           my $sshinfo = PVE::Cluster::get_ssh_info($target_node);
+           my $sshinfo = PVE::SSHInfo::get_ssh_info($target_node);
            PVE::Storage::storage_migrate($cfg, $src_volid, $sshinfo, $target_sid, $target_volname);
 
            print "DEBUG: end worker $upid\n";
index b9437c82146991d477bac53664b8b4023466ed95..bb3b8743f296c353630e0266dbe6d83dcbe25eaa 100755 (executable)
@@ -20,6 +20,7 @@ use PVE::Exception qw(raise_param_exc);
 use PVE::JSONSchema;
 use PVE::INotify;
 use PVE::RPCEnvironment;
+use PVE::SSHInfo;
 
 use PVE::Storage::Plugin;
 use PVE::Storage::DirPlugin;
@@ -574,8 +575,8 @@ sub storage_migrate {
     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);
-    my $ssh_base = PVE::Cluster::ssh_info_to_command_base($target_sshinfo);
+    my $ssh = PVE::SSHInfo::ssh_info_to_command($target_sshinfo);
+    my $ssh_base = PVE::SSHInfo::ssh_info_to_command_base($target_sshinfo);
     local $ENV{RSYNC_RSH} = PVE::Tools::cmd2string($ssh_base);
 
     my @cstream = ([ '/usr/bin/cstream', '-t', $ratelimit_bps ])