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 CB9F661E8B for ; Mon, 28 Sep 2020 17:49:15 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 428CC2FBC2 for ; Mon, 28 Sep 2020 17:48:45 +0200 (CEST) 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 85C362FB98 for ; Mon, 28 Sep 2020 17:48:43 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 52409447DD for ; Mon, 28 Sep 2020 17:48:43 +0200 (CEST) From: Stefan Reiter To: pve-devel@lists.proxmox.com Date: Mon, 28 Sep 2020 17:48:36 +0200 Message-Id: <20200928154836.5928-5-s.reiter@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200928154836.5928-1-s.reiter@proxmox.com> References: <20200928154836.5928-1-s.reiter@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.051 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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: [pve-devel] [PATCH qemu-server 5/5] vzdump: log 'finishing' state 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: Mon, 28 Sep 2020 15:49:15 -0000 ...and avoid printing 100% status twice Signed-off-by: Stefan Reiter --- PVE/VZDump/QemuServer.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm index 7297795..575abb3 100644 --- a/PVE/VZDump/QemuServer.pm +++ b/PVE/VZDump/QemuServer.pm @@ -360,6 +360,7 @@ my $query_backup_status_loop = sub { } my $first_round = 1; + my $last_finishing = 0; while(1) { my $status = mon_cmd($vmid, 'query-backup'); @@ -401,7 +402,9 @@ my $query_backup_status_loop = sub { my $res = $status->{status} || 'unknown'; if ($res ne 'active') { - $self->loginfo($statusline); + if ($last_percent < 100) { + $self->loginfo($statusline); + } if ($res ne 'done') { die (($status->{errmsg} || "unknown error") . "\n") if $res eq 'error'; die "got unexpected status '$res'\n"; @@ -421,6 +424,11 @@ my $query_backup_status_loop = sub { $last_transferred = $transferred if $transferred; $last_time = $ctime; $last_reused = $reused; + + if (!$last_finishing && $status->{finishing}) { + $self->loginfo("Waiting for server to finish verification..."); + } + $last_finishing = $status->{finishing}; } sleep(1); $first_round = 0 if $first_round; -- 2.20.1