public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 qemu-server] fix #3369: auto-start vm after failed stopmode backup
@ 2021-04-20 13:14 Dylan Whyte
  2021-04-22  8:42 ` Fabian Grünbichler
  2021-04-22  9:36 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Dylan Whyte @ 2021-04-20 13:14 UTC (permalink / raw)
  To: pve-devel

Fixes an issue in which a VM/CT fails to automatically restart after a
failed stop-mode backup.

Also fixes a minor typo in a comment

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
---

Note:

v1->v2:
- Fix the issue from within PVE::VZDump::QemuServer, rather than adding
  tedious sleep call and state checking in PVE::VZDump.

 PVE/VZDump/QemuServer.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index 8920ac1f..42a60fc7 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -551,6 +551,7 @@ sub archive_pbs {
     if ($err) {
 	$self->logerr($err);
 	$self->mon_backup_cancel($vmid);
+	$self->resume_vm_after_job_start($task, $vmid);
     }
     $self->restore_vm_power_state($vmid);
 
@@ -729,6 +730,7 @@ sub archive_vma {
     if ($err) {
 	$self->logerr($err);
 	$self->mon_backup_cancel($vmid);
+	$self->resume_vm_after_job_start($task, $vmid);
     }
 
     $self->restore_vm_power_state($vmid);
@@ -815,7 +817,7 @@ sub enforce_vm_running_for_backup {
     die $@ if $@;
 }
 
-# resume VM againe once we got in a clear state (stop mode backup of running VM)
+# resume VM again once in a clear state (stop mode backup of running VM)
 sub resume_vm_after_job_start {
     my ($self, $task, $vmid) = @_;
 
-- 
2.20.1





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

end of thread, other threads:[~2021-04-22  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 13:14 [pve-devel] [PATCH v2 qemu-server] fix #3369: auto-start vm after failed stopmode backup Dylan Whyte
2021-04-22  8:42 ` Fabian Grünbichler
2021-04-22  9:36 ` [pve-devel] applied: " Thomas Lamprecht

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