all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] partially fix #3056: try to cancel backup without uuid
@ 2020-10-19 14:11 Dominik Csapak
  2020-10-29 17:26 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2020-10-19 14:11 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-29 17:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 14:11 [pve-devel] [PATCH qemu-server] partially fix #3056: try to cancel backup without uuid Dominik Csapak
2020-10-29 17:26 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal