public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Reiter <s.reiter@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 5/5] vzdump: log 'finishing' state
Date: Mon, 28 Sep 2020 17:48:36 +0200	[thread overview]
Message-ID: <20200928154836.5928-5-s.reiter@proxmox.com> (raw)
In-Reply-To: <20200928154836.5928-1-s.reiter@proxmox.com>

...and avoid printing 100% status twice

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
---
 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





  parent reply	other threads:[~2020-09-28 15:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 15:48 [pve-devel] [PATCH pve-qemu 1/5] Add transaction patches and fix for blocking finish Stefan Reiter
2020-09-28 15:48 ` [pve-devel] [PATCH qemu 2/5] PVE: Add sequential job transaction support Stefan Reiter
2020-09-28 15:48 ` [pve-devel] [PATCH qemu 3/5] PVE-Backup: Use a transaction to synchronize job states Stefan Reiter
2020-09-28 15:48 ` [pve-devel] [PATCH qemu 4/5] PVE-Backup: Use more coroutines and don't block on finishing Stefan Reiter
2020-09-28 15:48 ` Stefan Reiter [this message]
2020-09-29 16:25   ` [pve-devel] applied: [PATCH qemu-server 5/5] vzdump: log 'finishing' state Thomas Lamprecht
2020-09-29 14:22 ` [pve-devel] applied: [PATCH pve-qemu 1/5] Add transaction patches and fix for blocking finish Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200928154836.5928-5-s.reiter@proxmox.com \
    --to=s.reiter@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal