]> git.proxmox.com Git - qemu-server.git/commitdiff
vzdump: improve error reporting
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 28 Feb 2013 09:47:55 +0000 (10:47 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 28 Feb 2013 09:47:55 +0000 (10:47 +0100)
And use kill(9) instead of kill(-9), which simply hangs

PVE/VZDump/QemuServer.pm
changelog.Debian

index 38cf74743bec21203dab57a422fd902cb44a9490..d85845ec54cce685c5df3ffe153f2cc3ef44fa9e 100644 (file)
@@ -348,7 +348,7 @@ sub archive {
                    die "fork compressor '$comp' failed\n";
                };
                if (my $err = $@) {
-                   warn $err;
+                   $self->logerr($err);
                    POSIX::_exit(1); 
                }
                POSIX::_exit(0); 
@@ -453,9 +453,12 @@ sub archive {
     my $err = $@;
 
     if ($err) {
+       $self->logerr($err);
        $self->loginfo("aborting backup job");
        eval { PVE::QemuServer::vm_mon_cmd($vmid, 'backup-cancel'); };
-       warn $@ if $@;
+       if (my $err1 = $@) {
+           $self->logerr($err1);
+       }
     }
 
     if ($stop_after_backup) {
@@ -475,7 +478,7 @@ sub archive {
 
     if ($err) {
        if ($cpid) { 
-           kill(-9, $cpid); 
+           kill(9, $cpid); 
            waitpid($cpid, 0);
        }
        die $err;
index cf155d53cd70ae18179bd95a17e13fab8ed7e8e2..9dc2bc77afffb5ec5d168570003f2547f308892f 100644 (file)
@@ -5,6 +5,8 @@ qemu-server (2.3-14) unstable; urgency=low
   * Migrate: fix check if a backing file exist  
   
   * vncproxy: wait max 10s for the socket if it does not exist
+  
+  * vzdump: improve error reporting
 
  -- Proxmox Support Team <support@proxmox.com>  Thu, 28 Feb 2013 06:21:30 +0100