public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server] partially fix #3056: try to cancel backup without uuid
Date: Mon, 19 Oct 2020 16:11:38 +0200	[thread overview]
Message-ID: <20201019141138.13875-1-d.csapak@proxmox.com> (raw)

if the 'backup' qmp call itself times out or fails, we still want to
try to cancel the backup, else it can happen that there is still
a backup running even when vzdump thinks it was canceled

qapi docs says that backup cancel always returns success, even
if no backup is running

since we hold a global and a per vm lock for the backup, this should be
ok, since we should not reach this code without that lock

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 PVE/VZDump/QemuServer.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index c8094bd..8792e76 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -577,7 +577,7 @@ sub archive_pbs {
     my $err = $@;
     if ($err) {
 	$self->logerr($err);
-	$self->mon_backup_cancel($vmid) if defined($backup_job_uuid);
+	$self->mon_backup_cancel($vmid);
     }
     $self->restore_vm_power_state($vmid);
 
@@ -754,7 +754,7 @@ sub archive_vma {
     my $err = $@;
     if ($err) {
 	$self->logerr($err);
-	$self->mon_backup_cancel($vmid) if defined($backup_job_uuid);
+	$self->mon_backup_cancel($vmid);
     }
 
     $self->restore_vm_power_state($vmid);
-- 
2.20.1





             reply	other threads:[~2020-10-19 14:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 14:11 Dominik Csapak [this message]
2020-10-29 17:26 ` [pve-devel] applied: " 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=20201019141138.13875-1-d.csapak@proxmox.com \
    --to=d.csapak@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