[pve-devel] [PATCH qemu-server 04/10] migrate: read mtunnel version
Fabian Grünbichler
f.gruenbichler at proxmox.com
Fri Aug 4 12:09:49 CEST 2017
On Fri, Aug 04, 2017 at 11:54:56AM +0200, Thomas Lamprecht wrote:
> 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
originally intended for debugging, but I liked it so I left it in :P
I'll restructure this part and also add handling of a bogus version
line.
>
> > + };
> > +
> > if ($err) {
> > $self->finish_command_pipe($tunnel);
> > die "can't open migration tunnel - $err";
> >
>
>
More information about the pve-devel
mailing list