[pve-devel] [PATCH qemu-server 04/10] migrate: read mtunnel version

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Aug 4 11:54:56 CEST 2017


On 08/04/2017 10:55 AM, Fabian Grünbichler wrote:
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
>   PVE/QemuMigrate.pm | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
> index beaa1e3..f9ce8ca 100644
> --- a/PVE/QemuMigrate.pm
> +++ b/PVE/QemuMigrate.pm
> @@ -143,6 +143,13 @@ sub fork_tunnel {
>       };
>       my $err = $@;
>   
> +    eval {
> +	my $ver = $self->read_tunnel($tunnel, 10);
> +	$ver =~ /^ver (\d+\.\d+)$/;
> +	$tunnel->{version} = $1 if $1;
> +	$self->log('info', "ssh tunnel version: $tunnel->{version}\n");

$tunnel->{version} may be undefined here

> +    };
> +
>       if ($err) {
>   	$self->finish_command_pipe($tunnel);
>   	die "can't open migration tunnel - $err";
> 






More information about the pve-devel mailing list