From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 0DF3768F71 for ; Thu, 11 Feb 2021 10:47:23 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0343119E1E for ; Thu, 11 Feb 2021 10:46:53 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 29A6D19E11 for ; Thu, 11 Feb 2021 10:46:52 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E708C41BAE for ; Thu, 11 Feb 2021 10:46:51 +0100 (CET) To: pve-devel@lists.proxmox.com References: <20210211094200.20664-1-f.ebner@proxmox.com> From: Fabian Ebner Message-ID: <213467e1-fb76-5d5f-064b-45ce9a61b5b7@proxmox.com> Date: Thu, 11 Feb 2021 10:46:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210211094200.20664-1-f.ebner@proxmox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.058 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.119 Looks like a legit reply (A) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH storage] storage migration: insecure: improve logging X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2021 09:47:23 -0000 This breaks pvesr replication, because the -T switch is active there. I'll send a v2 and preserve the regex captures. Am 11.02.21 um 10:42 schrieb Fabian Ebner: > by including the message/error from the remote side. Some people on the forum [0] > ran into 'no tunnel IP received', but without information from the remote side > it's hard to tell why. > > [0]: https://forum.proxmox.com/threads/failed-no-tunnel-ip-received.80172 > > Signed-off-by: Fabian Ebner > --- > PVE/Storage.pm | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/PVE/Storage.pm b/PVE/Storage.pm > index 22a6ef1..3c03abe 100755 > --- a/PVE/Storage.pm > +++ b/PVE/Storage.pm > @@ -758,8 +758,16 @@ sub storage_migrate { > or die "receive command failed: $!\n"; > close($input); > > - my ($ip) = <$info> =~ /^($PVE::Tools::IPRE)$/ or die "no tunnel IP received\n"; > - my ($port) = <$info> =~ /^(\d+)$/ or die "no tunnel port received\n"; > + my $ip = <$info> // ''; > + chomp($ip); > + die "no tunnel IP received, got '$ip'\n" > + if $ip !~ /^$PVE::Tools::IPRE$/; > + > + my $port = <$info> // ''; > + chomp($port); > + die "no tunnel port received, got '$port'\n" > + if $port !~ /^\d+$/; > + > my $socket = IO::Socket::IP->new(PeerHost => $ip, PeerPort => $port, Type => SOCK_STREAM) > or die "failed to connect to tunnel at $ip:$port\n"; > # we won't be reading from the socket >