]> git.proxmox.com Git - qemu-server.git/commitdiff
fix #1779: vzdump: ensure guest-fsfreeze-thaw is called on error
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 23 May 2018 09:07:39 +0000 (11:07 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 23 May 2018 09:18:28 +0000 (11:18 +0200)
as QMPClient's queue_execute can throw an error

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
PVE/VZDump/QemuServer.pm

index 42680f85de6a94a75220ffe3caa53fc1b73e34cf..70abe994b67dc1b4d4985e19b30356d9af80e7cc 100644 (file)
@@ -417,7 +417,8 @@ sub archive {
            }
        }
 
-       $qmpclient->queue_execute();
+       eval { $qmpclient->queue_execute() };
+       my $qmperr = $@;
 
        if ($agent_running){
            eval { PVE::QemuServer::vm_mon_cmd($vmid, "guest-fsfreeze-thaw"); };
@@ -425,6 +426,7 @@ sub archive {
                $self->logerr($err);
            }
        }
+       die $qmperr if $qmperr;
        die $qmpclient->{errors}->{$vmid} if $qmpclient->{errors}->{$vmid};
 
        if ($cpid) {