[pve-devel] [PATCH v3 qemu-server 11/22] Use new storage_migrate interface

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Mar 16 12:06:11 CET 2020


On March 12, 2020 1:08 pm, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
>  PVE/QemuMigrate.pm | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
> index 44e4c57..464abc6 100644
> --- a/PVE/QemuMigrate.pm
> +++ b/PVE/QemuMigrate.pm
> @@ -478,15 +478,19 @@ sub sync_disks {
>  		next if $self->{replicated_volumes}->{$volid};
>  		push @{$self->{volumes}}, $volid;
>  		my $opts = $self->{opts};
> -		my $insecure = $opts->{migration_type} eq 'insecure';
> -		my $with_snapshots = $local_volumes->{$volid}->{snapshots};
>  		# use 'migrate' limit for transfer to other node
>  		my $bwlimit = PVE::Storage::get_bandwidth_limit('migration', [$targetsid, $sid], $opts->{bwlimit});
>  		# JSONSchema and get_bandwidth_limit use kbps - storage_migrate bps
>  		$bwlimit = $bwlimit * 1024 if defined($bwlimit);
>  
> -		PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $targetsid,
> -					      undef, undef, undef, $bwlimit, $insecure, $with_snapshots);
> +		my $storage_migrate_opts = {
> +		    'bwlimit' => $bwlimit,
> +		    'insecure' => $opts->{migration_type} eq 'insecure',
> +		    'with_snapshots' => $local_volumes->{$volid}->{snapshots},
> +		};
> +
> +		PVE::Storage::storage_migrate($self->{storecfg}, $volid,
> +		    $self->{ssh_info}, $targetsid, $storage_migrate_opts);

nit: wrong alignment

>  	    }
>  	}
>      };
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 




More information about the pve-devel mailing list