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

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Aug 4 14:54:01 CEST 2017


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 PVE/QemuMigrate.pm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index beaa1e3..a038050 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -143,6 +143,16 @@ sub fork_tunnel {
     };
     my $err = $@;
 
+    eval {
+	my $ver = $self->read_tunnel($tunnel, 10);
+	if ($ver =~ /^ver (\d+)$/) {
+	    $tunnel->{version} = $1;
+	    $self->log('info', "ssh tunnel $ver\n");
+	} else {
+	    $err = "received invalid tunnel version string '$ver'\n" if !$err;
+	}
+    };
+
     if ($err) {
 	$self->finish_command_pipe($tunnel);
 	die "can't open migration tunnel - $err";
-- 
2.11.0





More information about the pve-devel mailing list